From 4d567a0d2fe21e3db6dac4e79867edc3beae962d Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 4 Oct 2010 01:48:34 -0400 Subject: [PATCH] Fixed cut-and-paste error in malloc() failure test (thanks, Tolga!). --- docs/CREDITS.txt | 3 +++ src/physfs.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/CREDITS.txt b/docs/CREDITS.txt index 8bd75eef..dcb904ce 100644 --- a/docs/CREDITS.txt +++ b/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 ... diff --git a/src/physfs.c b/src/physfs.c index d3504ee1..e3a9fe16 100644 --- a/src/physfs.c +++ b/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);