Patched a bug where doOpen() reported success when the file couldn't be

opened (doh!).
This commit is contained in:
Ryan C. Gordon 2002-06-23 09:17:59 +00:00
parent 3627c1cc05
commit d84de3237b
1 changed files with 1 additions and 2 deletions

View File

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