Skip to content

Commit 1dcd874

Browse files
committed
(ozone) Don't call string_to_unsigned twice
1 parent ff8b7dc commit 1dcd874

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

menu/drivers/ozone.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3883,7 +3883,8 @@ static void ozone_update_savestate_thumbnail_path(void *data, unsigned i)
38833883

38843884
if (!string_is_empty(entry.label))
38853885
{
3886-
if ( string_to_unsigned(entry.label) == MENU_ENUM_LABEL_STATE_SLOT
3886+
unsigned _state_slot = string_to_unsigned(entry.label);
3887+
if ( _state_slot == MENU_ENUM_LABEL_STATE_SLOT
38873888
|| string_is_equal(entry.label, MENU_ENUM_LABEL_STATE_SLOT_STR)
38883889
|| string_is_equal(entry.label, MENU_ENUM_LABEL_LOAD_STATE_STR)
38893890
|| string_is_equal(entry.label, MENU_ENUM_LABEL_SAVE_STATE_STR))
@@ -3893,7 +3894,7 @@ static void ozone_update_savestate_thumbnail_path(void *data, unsigned i)
38933894
int state_slot = settings->ints.state_slot;
38943895

38953896
/* State slot dropdown */
3896-
if (string_to_unsigned(entry.label) == MENU_ENUM_LABEL_STATE_SLOT)
3897+
if (_state_slot == MENU_ENUM_LABEL_STATE_SLOT)
38973898
{
38983899
state_slot = i - 1;
38993900
ozone->flags |= OZONE_FLAG_IS_STATE_SLOT;

0 commit comments

Comments
 (0)