summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-04-10 22:07:43 +0000
committerGuido van Rossum <guido@python.org>2001-04-10 22:07:43 +0000
commit8e791e3b6a81bb11c7781995993b3e719480a1bf (patch)
treea95c535e4beee0edcbcf201808d01736ed688179 /Python
parent49fbc9f3971faf2477a9f7b86b90f9e208d9cd26 (diff)
downloadcpython-8e791e3b6a81bb11c7781995993b3e719480a1bf.tar.gz
Updated version of RISCOS support. SF patch 411213 by Dietmar Schwertberger
Diffstat (limited to 'Python')
-rw-r--r--Python/sysmodule.c4
1 files changed, 4 insertions, 0 deletions
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 */