Skip to content

Commit

Permalink
Patched a bug where doOpen() reported success when the file couldn't be
Browse files Browse the repository at this point in the history
 opened (doh!).
  • Loading branch information
icculus committed Jun 23, 2002
1 parent 4528317 commit 0a0b14f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions platform/posix.c
Expand Up @@ -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)
Expand Down

0 comments on commit 0a0b14f

Please sign in to comment.