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);
|
||||
str = (char *)*h;
|
||||
memcpy(buf, str+1, (unsigned char)str[0]);
|
||||
buf[(unsigned char)str[0]] = '\0';
|
||||
HUnlock(h);
|
||||
ReleaseResource(h);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue