Error case in gbCheatReadGSCodeFile

Silence GCC warning
This commit is contained in:
Mystro256 2017-02-12 01:16:35 -05:00 committed by Rafael Kitover
parent b38cb9b522
commit e9e2100f6d
1 changed files with 5 additions and 1 deletions

View File

@ -403,7 +403,11 @@ bool gbCheatReadGSCodeFile(const char* fileName)
fseek(file, 0x18, SEEK_SET);
int count = 0;
fread(&count, 1, 2, file);
if(fread(&count, 1, 2, file) == 0 ) {
fclose(file);
return false;
}
int dummy = 0;
gbCheatRemoveAll();
char desc[13];