Minor Windows fix (thanks, fydo!).

This commit is contained in:
Ryan C. Gordon 2008-02-13 05:48:57 +00:00
parent 81d6df6972
commit 0e720678af
2 changed files with 5 additions and 2 deletions

View File

@ -4,6 +4,7 @@
-- stuff in the stable-1.0 branch, backported from 2.0.0 dev branch, etc ---
02132008 - Minor Windows fix (thanks, fydo!).
01222008 - Added zlib README, and updated LICENSE.txt.
01212008 - Fixed HTTP header in physfshttpd.c.
12112007 - Fixed incorrect directory test in Windows code (thanks, Buginator!).

View File

@ -78,8 +78,7 @@ static const char *win32strerror(void)
{
static TCHAR msgbuf[255];
TCHAR *ptr = msgbuf;
FormatMessage(
DWORD rc = FormatMessage(
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
@ -90,6 +89,9 @@ static const char *win32strerror(void)
NULL
);
if (rc == 0)
msgbuf = '\0'; /* oh well. */
/* chop off newlines. */
for (ptr = msgbuf; *ptr; ptr++)
{