Chez Scheme: fix compilation problems for MinGW

This commit is contained in:
Matthew Flatt 2021-01-26 05:59:03 -07:00
parent c54ab626f7
commit 18954fdc70

View File

@ -255,8 +255,8 @@ static ptr s_ErrorStringImp(DWORD dwMessageId, const char *lpcDefault) {
} else { } else {
/* ...otherwise, use the error code in hexadecimal. */ /* ...otherwise, use the error code in hexadecimal. */
char buf[(sizeof(dwMessageId) * 2) + 3]; char buf[(sizeof(dwMessageId) * 2) + 3];
int n = snprintf(buf, sizeof(buf), "0x%x", dwMessageId); int n = snprintf(buf, sizeof(buf), "0x%lx", dwMessageId);
if (n < sizeof(buf)) if ((unsigned)n < sizeof(buf))
return Sstring_utf8(buf, n); return Sstring_utf8(buf, n);
else else
return Sstring("??"); return Sstring("??");