null-terminate the error string in macstrerror
This commit is contained in:
parent
e6c884cadb
commit
cc9bc8f824
|
@ -123,6 +123,7 @@ char *macstrerror(int err)
|
||||||
HLock(h);
|
HLock(h);
|
||||||
str = (char *)*h;
|
str = (char *)*h;
|
||||||
memcpy(buf, str+1, (unsigned char)str[0]);
|
memcpy(buf, str+1, (unsigned char)str[0]);
|
||||||
|
buf[(unsigned char)str[0]] = '\0';
|
||||||
HUnlock(h);
|
HUnlock(h);
|
||||||
ReleaseResource(h);
|
ReleaseResource(h);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue