Przeglądaj źródła

Fixed cut-and-paste error in malloc() failure test (thanks, Tolga!).

Ryan C. Gordon 15 lat temu
rodzic
commit
4d567a0d2f
2 zmienionych plików z 4 dodań i 1 usunięć
  1. 3 0
      docs/CREDITS.txt
  2. 1 1
      src/physfs.c

+ 3 - 0
docs/CREDITS.txt

@@ -115,6 +115,9 @@ ISO9660 archiver:
 Bug fixes:
     Steven Fuller
 
+Bug fixes:
+    Tolga Dalman
+
 Other stuff:
     Your name here! Patches go to icculus@icculus.org ...
 

+ 1 - 1
src/physfs.c

@@ -234,7 +234,7 @@ PHYSFS_Io *__PHYSFS_createNativeIo(const char *path, const int mode)
     info = (NativeIoInfo *) allocator.Malloc(sizeof (NativeIoInfo));
     GOTO_IF_MACRO(info == NULL, ERR_OUT_OF_MEMORY, createNativeIo_failed);
     pathdup = (char *) allocator.Malloc(strlen(path) + 1);
-    GOTO_IF_MACRO(info == NULL, ERR_OUT_OF_MEMORY, createNativeIo_failed);
+    GOTO_IF_MACRO(pathdup == NULL, ERR_OUT_OF_MEMORY, createNativeIo_failed);
 
     if (mode == 'r')
         handle = __PHYSFS_platformOpenRead(path);