Minor Windows fix (thanks, fydo!).
This commit is contained in:
parent
81d6df6972
commit
0e720678af
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
-- stuff in the stable-1.0 branch, backported from 2.0.0 dev branch, etc ---
|
-- 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.
|
01222008 - Added zlib README, and updated LICENSE.txt.
|
||||||
01212008 - Fixed HTTP header in physfshttpd.c.
|
01212008 - Fixed HTTP header in physfshttpd.c.
|
||||||
12112007 - Fixed incorrect directory test in Windows code (thanks, Buginator!).
|
12112007 - Fixed incorrect directory test in Windows code (thanks, Buginator!).
|
||||||
|
|
|
@ -78,8 +78,7 @@ static const char *win32strerror(void)
|
||||||
{
|
{
|
||||||
static TCHAR msgbuf[255];
|
static TCHAR msgbuf[255];
|
||||||
TCHAR *ptr = msgbuf;
|
TCHAR *ptr = msgbuf;
|
||||||
|
DWORD rc = FormatMessage(
|
||||||
FormatMessage(
|
|
||||||
FORMAT_MESSAGE_FROM_SYSTEM |
|
FORMAT_MESSAGE_FROM_SYSTEM |
|
||||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -90,6 +89,9 @@ static const char *win32strerror(void)
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (rc == 0)
|
||||||
|
msgbuf = '\0'; /* oh well. */
|
||||||
|
|
||||||
/* chop off newlines. */
|
/* chop off newlines. */
|
||||||
for (ptr = msgbuf; *ptr; ptr++)
|
for (ptr = msgbuf; *ptr; ptr++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue