make sure -o is followed by path, not other option

This commit is contained in:
Daniel Gibson 2016-04-02 16:47:38 +02:00
parent c4f79aee0e
commit 60c556b7b8

View file

@ -422,7 +422,7 @@ main(int argc, char *argv[])
else if(strcmp(arg, "-o") == 0)
{
++i; // go to next argument (should be out_dir)
if(i == argc) // no further argument?
if(i == argc || argv[i][0] == '-') // no further argument/next argument option?
{
fprintf(stderr, "!! -o must be followed by output dir !!\n");
printUsage(argv[0]);