From 0a0b14f0e4a4fca56c1ecb7458cadc332b37065a Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 23 Jun 2002 09:17:59 +0000 Subject: [PATCH] Patched a bug where doOpen() reported success when the file couldn't be opened (doh!). --- platform/posix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/posix.c b/platform/posix.c index c183d86c..81ac8694 100644 --- a/platform/posix.c +++ b/platform/posix.c @@ -362,8 +362,7 @@ static void *doOpen(const char *filename, int mode) errno = 0; fd = open(filename, mode, S_IRUSR | S_IWUSR); - if (fd < 0) - __PHYSFS_setError(strerror(errno)); + BAIL_IF_MACRO(fd < 0, strerror(errno), NULL); retval = (int *) malloc(sizeof (int)); if (retval == NULL)