Fixed IPS loader to prevent double archive browser

This commit is contained in:
Alexey 'Cluster' Avdyukhin 2022-12-19 14:55:53 +04:00
parent f53c2470fc
commit f3675320d8
1 changed files with 3 additions and 3 deletions

View File

@ -1078,12 +1078,12 @@ void CloseGame()
bool ALoad(const char *nameo, char* innerFilename, bool silent) bool ALoad(const char *nameo, char* innerFilename, bool silent)
{ {
FCEUFILE* patchTrial = FCEU_fopen(nameo,nullptr,"rb",nullptr,-1); FILE* patchTrial = fopen(nameo, "rb");
if(patchTrial) if(patchTrial)
{ {
char sig[10] = {0}; char sig[10] = {0};
FCEU_fread(sig,1,5,patchTrial); fread(sig,1,5,patchTrial);
FCEU_fclose(patchTrial); fclose(patchTrial);
if(!strcmp(sig,"PATCH")) if(!strcmp(sig,"PATCH"))
{ {
//assuming it's a patch: //assuming it's a patch: