Merge pull request #5334 from QuarkTheAwesome/master

[libretro-common] Fix null dereference where argc is 0
This commit is contained in:
Twinaphex 2017-08-19 10:01:37 +02:00 committed by GitHub
commit 99aaee50f9

View File

@ -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]);