diff --git a/commandline.c b/commandline.c index 247370f..94d2c4f 100644 --- a/commandline.c +++ b/commandline.c @@ -65,7 +65,7 @@ int parseArgs( switch( option_index ){ case 2: // --version printf( VERSIONSTRING ); - return 1; + return 0; case 6: // --slow-calcWins free( *wins ); *wins = NULL; @@ -80,7 +80,8 @@ int parseArgs( argv[0], long_options[ option_index ].name ); - return -1; + return -1; + break; } break; case 'h': // --help @@ -98,7 +99,7 @@ int parseArgs( " --slow-calcwins Use the reference implementation of calcWins()\n" " --random-moves Play random moves instead of asking for input\n" ); - return 1; + return 0; case 'l': // --license for( char *p = _binary_LICENSE_start; @@ -107,7 +108,7 @@ int parseArgs( ){ putchar( *p ); } - return 1; + return 0; case 'c': // --columns board->columns = (columnsint_t)atoi(optarg); break; @@ -125,7 +126,6 @@ int parseArgs( return -1; } break; - case '?': return -1; } } // Check for unhandled options diff --git a/connect4.c b/connect4.c index 7152e57..fe991e9 100644 --- a/connect4.c +++ b/connect4.c @@ -57,7 +57,6 @@ int main( &randomMoves ) ){ - case -1: return -1; case 0: break; case 1: return 0; default: return -1; diff --git a/macros.h b/macros.h index 195f24c..2ecd282 100644 --- a/macros.h +++ b/macros.h @@ -8,7 +8,7 @@ #define XSTR(s) STR(s) #define STR(s) #s -#define VERSION 0.3.2 +#define VERSION 0.3.1 #ifndef GITHASH #define FULLVERSION VERSION