Prevent .zip files containing no valid files from causing crash
This commit is contained in:
parent
68e300e7a2
commit
b33b01febd
|
@ -218,7 +218,9 @@ static FCEUFILE * TryUnzip(const std::string& path) {
|
|||
if(unzGoToNextFile(tz)!=UNZ_OK)
|
||||
{
|
||||
if(unzGoToFirstFile(tz)!=UNZ_OK) goto zpfail;
|
||||
break;
|
||||
unzCloseCurrentFile(tz);
|
||||
unzClose(tz);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if(unzOpenCurrentFile(tz)!=UNZ_OK)
|
||||
|
|
Loading…
Reference in New Issue