Fix crash in zip handling

This commit is contained in:
Henrik Rydgård committed 2019-09-27 22:55:39 +02:00
1 parent a484fab919
commit ccf63ef544
1 file changed
+5
+5
View File
@@ -431,6 +431,11 @@ bool GameManager::ExtractFile(struct zip *z, int file_index, std::string outFile
}
zip_file *zf = zip_fopen_index(z, file_index, 0);
if (!zf) {
ERROR_LOG(HLE, "Failed to open file by index (%d) (%s)", file_index, outFilename.c_str());
return false;
}
FILE *f = File::OpenCFile(outFilename, "wb");
if (f) {
size_t pos = 0;