Fix minor bug in readCheatFile()
- This bug won't cause any trouble unless you use the minimal YAML example or smaller.
This commit is contained in:
parent
90fb4e39a5
commit
88473a8dd9
2
menu.c
2
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):
|
* The cheat list in this case fits into exactly 8 bytes (2 words):
|
||||||
* 0x80001234, 0x0000FFFF
|
* 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) {
|
if (!list1) {
|
||||||
// Free
|
// Free
|
||||||
free(cheatfile);
|
free(cheatfile);
|
||||||
|
Loading…
Reference in New Issue
Block a user