Patch for snprintf provided by Marco Atzeri
This commit is contained in:
parent
902a62d2f4
commit
f99a137eb3
|
|
@ -39,7 +39,7 @@ char *dlerror(void) // Lifted from dev.c.
|
|||
if (rc == 0) { /* FormatMessage failed */
|
||||
(void) sprintf(errstr, errstr_fmt, (unsigned long) GetLastError());
|
||||
} else {
|
||||
snprintf(errstr, sizeof errstr, lpMsgBuf);
|
||||
snprintf(errstr, sizeof errstr, errstr_fmt, lpMsgBuf);
|
||||
LocalFree(lpMsgBuf);
|
||||
}
|
||||
return errstr;
|
||||
|
|
|
|||
Loading…
Reference in New Issue