mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Merge pull request #1279 from heuripedes/master
(cheats.c) Fix buffer reallocation
This commit is contained in:
commit
e5a9bc7b1f
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…
Reference in New Issue
Block a user