Patch for snprintf provided by Marco Atzeri

This commit is contained in:
Holger Vogt 2023-12-29 10:59:56 +01:00
parent 902a62d2f4
commit f99a137eb3
1 changed files with 1 additions and 1 deletions

View File

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