diff options
author | Zack Middleton <zturtleman@gmail.com> | 2014-03-18 20:37:33 -0500 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-06-17 17:43:42 +0100 |
commit | 4b1c828f2ee6a24934630408c7b95669555d2092 (patch) | |
tree | c09aee4bf03e0970d031e216a66db3225c0c2081 | |
parent | d98edf63c31e1e643af4864d099b42b15201614d (diff) |
Fix FS_FOpenFileReadDir non-zero file handle when file not found in pk3
If a pk3 search path is passed to FS_FOpenFileReadDir, a non-zero
file handle is returned if file is not found. This causes incorrect
behavior in FS_ReadFileDir (when a pk3 search path is passed in)
which only checks file handle, not length, for seeing if file exists.
I don't know of any issues in ioq3 caused by this.
-rw-r--r-- | src/qcommon/files.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qcommon/files.c b/src/qcommon/files.c index 67c891e4..576ad9d2 100644 --- a/src/qcommon/files.c +++ b/src/qcommon/files.c @@ -1288,6 +1288,7 @@ long FS_FOpenFileReadDir(const char *filename, searchpath_t *search, fileHandle_ return FS_fplength(filep); } + *file = 0; return -1; } |