Patched a bug where doOpen() reported success when the file couldn't be
opened (doh!).
This commit is contained in:
parent
4528317f39
commit
0a0b14f0e4
|
@ -362,8 +362,7 @@ static void *doOpen(const char *filename, int mode)
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|
||||||
fd = open(filename, mode, S_IRUSR | S_IWUSR);
|
fd = open(filename, mode, S_IRUSR | S_IWUSR);
|
||||||
if (fd < 0)
|
BAIL_IF_MACRO(fd < 0, strerror(errno), NULL);
|
||||||
__PHYSFS_setError(strerror(errno));
|
|
||||||
|
|
||||||
retval = (int *) malloc(sizeof (int));
|
retval = (int *) malloc(sizeof (int));
|
||||||
if (retval == NULL)
|
if (retval == NULL)
|
||||||
|
|
Loading…
Reference in New Issue