Fixed cut-and-paste error in malloc() failure test (thanks, Tolga!).
authorRyan C. Gordon <icculus@icculus.org>
Mon, 04 Oct 2010 01:48:34 -0400
changeset 1130 2db92d026ec6
parent 1129 d81afe4b0a97
child 1131 267ac8c2eb6b
Fixed cut-and-paste error in malloc() failure test (thanks, Tolga!).
docs/CREDITS.txt
src/physfs.c
--- a/docs/CREDITS.txt	Mon Sep 06 19:35:01 2010 -0400
+++ b/docs/CREDITS.txt	Mon Oct 04 01:48:34 2010 -0400
@@ -115,6 +115,9 @@
 Bug fixes:
     Steven Fuller
 
+Bug fixes:
+    Tolga Dalman
+
 Other stuff:
     Your name here! Patches go to icculus@icculus.org ...
 
--- a/src/physfs.c	Mon Sep 06 19:35:01 2010 -0400
+++ b/src/physfs.c	Mon Oct 04 01:48:34 2010 -0400
@@ -234,7 +234,7 @@
     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);