mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
Merge pull request #5401 from heuripedes/master
(xmb) Fix crash when browsing small lists
This commit is contained in:
commit
fa2b43f241
@ -2268,6 +2268,9 @@ static void xmb_calculate_visible_range(const xmb_handle_t *xmb,
|
|||||||
unsigned j;
|
unsigned j;
|
||||||
float base_y = xmb->margins.screen.top;
|
float base_y = xmb->margins.screen.top;
|
||||||
|
|
||||||
|
*first = 0;
|
||||||
|
*last = list_size ? list_size - 1 : 0;
|
||||||
|
|
||||||
if (current)
|
if (current)
|
||||||
{
|
{
|
||||||
for (j = current; j-- > 0; )
|
for (j = current; j-- > 0; )
|
||||||
@ -3967,8 +3970,8 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* FIXME: this shouldn't be happening at all */
|
/* FIXME: this shouldn't be happening at all */
|
||||||
if (selection >= xmb->selection_buf_old->size)
|
if (selection >= selection_buf->size)
|
||||||
selection = xmb->selection_buf_old->size ? xmb->selection_buf_old->size - 1 : 0;
|
selection = selection_buf->size ? selection_buf->size - 1 : 0;
|
||||||
|
|
||||||
xmb->selection_ptr_old = selection;
|
xmb->selection_ptr_old = selection;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user