Skip to content
Permalink
Browse files

Fixed a crash bug in checkkeys.c (thanks John!)

  • Loading branch information
slouken committed Sep 16, 2002
1 parent 9aa447d commit 1017e8942a0bf3249cd1e9e982ef02b9c11963c0
Showing with 8 additions and 2 deletions.
  1. +8 −2 test/checkkeys.c
@@ -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 */

0 comments on commit 1017e89

Please sign in to comment.