summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-04-10 22:07:43 (GMT)
committerGuido van Rossum <guido@python.org>2001-04-10 22:07:43 (GMT)
commitbceccf5f43b51d166951ea97cff086c8828b745b (patch)
tree051a8711efadb0a2c114debc509946507e65469e /Python/sysmodule.c
parent13aa70679ef504a7517261d5c4a3a27ee9aa30c7 (diff)
downloadcpython-bceccf5f43b51d166951ea97cff086c8828b745b.zip
cpython-bceccf5f43b51d166951ea97cff086c8828b745b.tar.gz
cpython-bceccf5f43b51d166951ea97cff086c8828b745b.tar.bz2
Updated version of RISCOS support. SF patch 411213 by Dietmar Schwertberger
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 9a0a43b..52fbbc8 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 */