File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -7486,13 +7486,16 @@ static bool retroarch_parse_input_and_config(
7486
7486
case 'e' :
7487
7487
{
7488
7488
char * endptr ;
7489
- int16_t entry_state_slot = ( unsigned ) strtoul (optarg , & endptr , 0 );
7489
+ long entry_state_slot = strtol (optarg , & endptr , 0 );
7490
7490
7491
- if (entry_state_slot > -1 && string_is_empty ( endptr ))
7492
- runloop_st -> entry_state_slot = entry_state_slot ;
7493
- else
7491
+ if (endptr == optarg || * endptr != '\0' ||
7492
+ entry_state_slot < 0 || entry_state_slot > 999 )
7493
+ {
7494
7494
RARCH_WARN ("[State]: --entryslot argument \"%s\" is not a valid "
7495
7495
"entry state slot index. Ignoring.\n" , optarg );
7496
+ }
7497
+ else
7498
+ runloop_st -> entry_state_slot = entry_state_slot ;
7496
7499
}
7497
7500
break ;
7498
7501
case RA_OPT_DATABASE_SCAN :
You can’t perform that action at this time.
0 commit comments