mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 22:13:51 +00:00
(cheats.c) Fix buffer reallocation
This commit is contained in:
parent
fe0ece3124
commit
947baa6b60
6
cheats.c
6
cheats.c
@ -262,9 +262,11 @@ bool cheat_manager_realloc(cheat_manager_t *handle, unsigned new_size)
|
||||
}
|
||||
|
||||
handle->buf_size = new_size;
|
||||
handle->size = new_size;
|
||||
|
||||
for (i = 0; i < handle->size; i++)
|
||||
if (handle->size > handle->buf_size)
|
||||
handle->size = handle->buf_size;
|
||||
|
||||
for (i = handle->size; i < handle->buf_size; i++)
|
||||
{
|
||||
handle->cheats[i].desc = NULL;
|
||||
handle->cheats[i].code = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user