null-terminate the error string in macstrerror

This commit is contained in:
Guido van Rossum 1995-02-13 16:17:03 +00:00
parent e6c884cadb
commit cc9bc8f824
1 changed files with 1 additions and 0 deletions

View File

@ -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 {