mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-30 07:41:16 +00:00
Fix FS_FOpenFileRead corner case
FS_FOpenFileRead is a fairly mental function that changes its return behaviour depending on whether or not file is NULL or not. It turns out in the case where file is NULL, we were returning the wrong value when the file didn't exist.
This commit is contained in:
parent
693e51c654
commit
5fd456ff7c
1 changed files with 11 additions and 4 deletions
|
@ -1361,10 +1361,17 @@ long FS_FOpenFileRead(const char *filename, fileHandle_t *file, qboolean uniqueF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(file)
|
if(file)
|
||||||
|
{
|
||||||
*file = 0;
|
*file = 0;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// When file is NULL, we're querying the existance of the file
|
||||||
|
// If we've got here, it doesn't exist
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=================
|
=================
|
||||||
|
|
Loading…
Reference in a new issue