Skip to content

Commit

Permalink
From: Jonathan Atkins
Browse files Browse the repository at this point in the history
Subject: testoverlay...

here's a fun one:
./testoverlay -scale -h

it seems to print argv[optind-1] as the program name...
  • Loading branch information
slouken committed Mar 6, 2003
1 parent 7bca3d3 commit e7a335b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/testoverlay.c
Expand Up @@ -315,6 +315,7 @@ static void PrintUsage(char *argv0)

int main(int argc, char **argv)
{
char *argv0 = argv[0];
int flip;
int delay;
int desired_bpp;
Expand Down Expand Up @@ -437,7 +438,7 @@ int main(int argc, char **argv)
argc -= 1;
} else
if (( strcmp(argv[1], "-help") == 0 ) || (strcmp(argv[1], "-h") == 0)) {
PrintUsage(argv[0]);
PrintUsage(argv0);
exit(1);
} else
if ( strcmp(argv[1], "-fullscreen") == 0 ) {
Expand Down

0 comments on commit e7a335b

Please sign in to comment.