summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Mac/Python/macglue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c
index cbeeee7..53f130f 100644
--- a/Mac/Python/macglue.c
+++ b/Mac/Python/macglue.c
@@ -123,6 +123,7 @@ char *macstrerror(int err)
HLock(h);
str = (char *)*h;
memcpy(buf, str+1, (unsigned char)str[0]);
+ buf[(unsigned char)str[0]] = '\0';
HUnlock(h);
ReleaseResource(h);
} else {