From 68200c2d6a497b50f576d1aad1e86fe3e02eb9b6 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Thu, 2 Jun 2011 04:07:14 +0000 Subject: [PATCH] sdl - fixed "--help" fix introduced with previous revision --- src/drivers/sdl/sdl.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/drivers/sdl/sdl.cpp b/src/drivers/sdl/sdl.cpp index c2c1a16b..cea139b5 100644 --- a/src/drivers/sdl/sdl.cpp +++ b/src/drivers/sdl/sdl.cpp @@ -499,11 +499,14 @@ int main(int argc, char *argv[]) // this is a hackish check for the --help arguemnts // these are normally processed by the config parser, but SDL_Init // must be run before the config parser: so if even SDL_Init fails, - // these four lines will still print the help output - if( !strcmp(argv[1], "--help") || !strcmp(argv[1],"-h")) + // these six lines will still print the help output + if(argc > 1) { - ShowUsage(argv[0]); - return 0; + if(!strcmp(argv[1], "--help") || !strcmp(argv[1],"-h")) + { + ShowUsage(argv[0]); + return 0; + } } int error, frameskip;