Skip to content

Commit

Permalink
Fixed a crash bug in checkkeys.c (thanks John!)
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 16, 2002
1 parent 9aa447d commit 1017e89
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/checkkeys.c
Expand Up @@ -87,8 +87,14 @@ int main(int argc, char *argv[])
atexit(SDL_Quit);

videoflags = SDL_SWSURFACE;
if ( strcmp(argv[1], "-fullscreen") == 0 ) {
videoflags |= SDL_FULLSCREEN;
while( argc > 1 ) {
--argc;
if ( argv[argc] && !strcmp(argv[argc], "-fullscreen") ) {
videoflags |= SDL_FULLSCREEN;
} else {
fprintf(stderr, "Usage: %s [-fullscreen]\n", argv[0]);
exit(1);
}
}

/* Set 640x480 video mode */
Expand Down

0 comments on commit 1017e89

Please sign in to comment.