Skip to content

Commit

Permalink
Merge branch 'master' of github.com:LIJI32/SameBoy
Browse files Browse the repository at this point in the history
  • Loading branch information
LIJI32 committed Nov 25, 2023
2 parents ecbdb9e + aff42af commit 5823bf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/cheats.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void GB_remove_cheat(GB_gameboy_t *gb, const GB_cheat_t *cheat)
*hash = NULL;
}
else {
*hash = malloc(sizeof(GB_cheat_hash_t) + sizeof(cheat) * (*hash)->size);
*hash = realloc(*hash, sizeof(GB_cheat_hash_t) + sizeof(cheat) * (*hash)->size);
}
break;
}
Expand Down Expand Up @@ -228,7 +228,7 @@ void GB_update_cheat(GB_gameboy_t *gb, const GB_cheat_t *_cheat, const char *des
*hash = NULL;
}
else {
*hash = malloc(sizeof(GB_cheat_hash_t) + sizeof(cheat) * (*hash)->size);
*hash = realloc(*hash, sizeof(GB_cheat_hash_t) + sizeof(cheat) * (*hash)->size);
}
break;
}
Expand Down

0 comments on commit 5823bf9

Please sign in to comment.