Prechádzať zdrojové kódy

Had a "msgbuf" where I should have had a "msgbuf[0]" (thanks, James!).

Ryan C. Gordon 18 rokov pred
rodič
commit
27d1a25b24
3 zmenil súbory, kde vykonal 4 pridanie a 2 odobranie
  1. 1 0
      CHANGELOG
  2. 1 0
      CREDITS
  3. 2 2
      platform/win32.c

+ 1 - 0
CHANGELOG

@@ -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 ---
 
 
+03112008 - Fixed wrong array index in Windows platform layer (thanks, James!).
 03082008 - Fixed compiler warnings in Windows platform layer (thanks, Dennis!).
 03082008 - Fixed compiler warnings in Windows platform layer (thanks, Dennis!).
 02202008 - Various archiver swap and compare functions now check if they are
 02202008 - Various archiver swap and compare functions now check if they are
            swapping/comparing an item against itself, for efficiency and
            swapping/comparing an item against itself, for efficiency and

+ 1 - 0
CREDITS

@@ -78,6 +78,7 @@ Mingw support:
 
 
 Bug fixes:
 Bug fixes:
     Jörg Walter
     Jörg Walter
+    James Haley
 
 
 Windows .rc file:
 Windows .rc file:
     Dennis Schridde
     Dennis Schridde

+ 2 - 2
platform/win32.c

@@ -90,9 +90,9 @@ static const char *win32strerror(void)
     );
     );
 
 
     if (rc == 0)
     if (rc == 0)
-        msgbuf = '\0';  /* oh well. */
+        msgbuf[0] = '\0';  /* oh well. Empty string. */
 
 
-        /* chop off newlines. */
+    /* chop off newlines... */
     for (ptr = msgbuf; *ptr; ptr++)
     for (ptr = msgbuf; *ptr; ptr++)
     {
     {
         if ((*ptr == '\n') || (*ptr == '\r'))
         if ((*ptr == '\n') || (*ptr == '\r'))