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

This commit is contained in:
Ryan C. Gordon 2010-10-04 01:48:34 -04:00
parent f871802f51
commit 4d567a0d2f
2 changed files with 4 additions and 1 deletions

View File

@ -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 ...

View File

@ -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);