mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
cellSaveData/overlays: prevent possible array out of bounds in list view
This commit is contained in:
parent
eed32cf3a4
commit
32b5b11a83
3 changed files with 24 additions and 3 deletions
|
|
@ -208,6 +208,12 @@ static error_code select_and_delete(ppu_thread& ppu)
|
|||
save_entries.erase(save_entries.cbegin() + selected);
|
||||
selected = -1;
|
||||
|
||||
// Reset the focused index if the new list is empty
|
||||
if (save_entries.empty())
|
||||
{
|
||||
focused = -1;
|
||||
}
|
||||
|
||||
// Display success message (return value should be irrelevant here)
|
||||
msg = "Successfully removed entry!\n\n" + info;
|
||||
cellSaveData.success("%s", msg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue