From bceccf5f43b51d166951ea97cff086c8828b745b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 10 Apr 2001 22:07:43 +0000 Subject: Updated version of RISCOS support. SF patch 411213 by Dietmar Schwertberger --- Python/sysmodule.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 9a0a43b682..52fbbc89d3 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -808,7 +808,11 @@ PySys_SetArgv(int argc, char **argv) if (argc > 0 && argv0 != NULL) p = strrchr(argv0, SEP); if (p != NULL) { +#ifndef RISCOS n = p + 1 - argv0; +#else /* don't include trailing separator */ + n = p - argv0; +#endif /* RISCOS */ #if SEP == '/' /* Special case for Unix filename syntax */ if (n > 1) n--; /* Drop trailing separator */ -- cgit v1.2.1