mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-13 07:21:31 +00:00
Fix a zip-related crash.
This commit is contained in:
parent
a7220b86a7
commit
bc5967f62c
1 changed files with 7 additions and 1 deletions
|
@ -2056,7 +2056,13 @@ static int COM_FindFile (const char *filename, int *handle, FILE **file,
|
||||||
{
|
{
|
||||||
fseek (f, pak->files[i].filepos, SEEK_SET);
|
fseek (f, pak->files[i].filepos, SEEK_SET);
|
||||||
f = FSZIP_Deflate(f, pak->files[i].deflatedsize, pak->files[i].filelen);
|
f = FSZIP_Deflate(f, pak->files[i].deflatedsize, pak->files[i].filelen);
|
||||||
*handle = Sys_FileOpenStdio(f);
|
if (f)
|
||||||
|
*handle = Sys_FileOpenStdio(f);
|
||||||
|
else
|
||||||
|
{ //error!
|
||||||
|
com_filesize = -1;
|
||||||
|
*handle = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //error!
|
{ //error!
|
||||||
|
|
Loading…
Reference in a new issue