diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index aab466ba71..c37a405e48 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3808,23 +3808,23 @@ static int action_ok_cheat_delete(const char *path, if (new_size >0) { unsigned i; + if (cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].code) - { free(cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].code); - cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].code = NULL; - } if (cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].desc) - { free(cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].desc); - cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].desc = NULL; - } + for (i = cheat_manager_state.working_cheat.idx; i nick, sizeof(netplay_room_list[i].nickname)); - strlcpy(netplay_room_list[i].address, host->address, INET6_ADDRSTRLEN); - + strlcpy(netplay_room_list[i].address, + host->address, + INET6_ADDRSTRLEN); strlcpy(netplay_room_list[i].corename, host->core, sizeof(netplay_room_list[i].corename)); @@ -5379,7 +5380,7 @@ static void netplay_refresh_rooms_cb(retro_task_t *task, netplay_room_list[i].port = host->port; netplay_room_list[i].gamecrc = host->content_crc; netplay_room_list[i].timestamp = 0; - netplay_room_list[i].lan = true; + netplay_room_list[i].lan = true; snprintf(s, sizeof(s), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME),