mirror of
https://github.com/libretro/RetroArch
synced 2025-02-25 03:40:50 +00:00
Merge pull request #5334 from QuarkTheAwesome/master
[libretro-common] Fix null dereference where argc is 0
This commit is contained in:
commit
99aaee50f9
@ -184,7 +184,7 @@ int getopt_long(int argc, char *argv[],
|
||||
if (optind == 0)
|
||||
optind = 1;
|
||||
|
||||
if (argc == 1)
|
||||
if (argc < 2)
|
||||
return -1;
|
||||
|
||||
short_index = find_short_index(&argv[optind]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user