From 88473a8dd932959e7fb247154c6766b4cd06f44e Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Tue, 26 Aug 2014 12:42:04 -0700 Subject: [PATCH] Fix minor bug in readCheatFile() - This bug won't cause any trouble unless you use the minimal YAML example or smaller. --- menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu.c b/menu.c index 656826a..4d29bc5 100644 --- a/menu.c +++ b/menu.c @@ -2185,7 +2185,7 @@ int readCheatFile(char *filename, u32 *cheat_lists[2]) { * The cheat list in this case fits into exactly 8 bytes (2 words): * 0x80001234, 0x0000FFFF */ - list1 = calloc(1, fsize + 2); // Plus 2 words to be safe + list1 = calloc(1, fsize + 2 * sizeof(u32)); // Plus 2 words to be safe if (!list1) { // Free free(cheatfile);