From 45c8b6a3d654ddbfa901247a8ea445c6524c3e25 Mon Sep 17 00:00:00 2001 From: skidau Date: Thu, 21 May 2015 07:42:14 +0000 Subject: [PATCH] Fixed the cheat list size check. --- src/gba/Cheats.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gba/Cheats.cpp b/src/gba/Cheats.cpp index 2ec4c96b..941ecc35 100644 --- a/src/gba/Cheats.cpp +++ b/src/gba/Cheats.cpp @@ -2747,7 +2747,7 @@ bool cheatsLoadCheatList(const char *file) } if (type == 1) { - if(fread(cheatsList, 1, sizeof(cheatsList), f) != sizeof(cheatsList)) { + if(fread(cheatsList, 1, sizeof(cheatsList), f) > sizeof(cheatsList)) { fclose(f); return false; }