From: Mischa POSLAWSKY Date: Sun, 4 Mar 2007 07:13:50 +0000 (+0100) Subject: fix default value for --dropmode X-Git-Url: http://git.shiar.net/netris.git/commitdiff_plain/5173b9d9a45c981a3061d4bb81af26fb44202e66 fix default value for --dropmode Caused segfault on missing value (i.e. netris -d) --- diff --git a/game.c b/game.c index a5a72ad..b9d83f4 100644 --- a/game.c +++ b/game.c @@ -147,7 +147,7 @@ void HandleOption(char tag, char *value) Players[0].team = atoi(value); break; case 'd': //dropmode - Sets.dropmode = atoi(value); + Sets.dropmode = value ? atoi(value) : 1; break; case 'C': //color if (value && !strcasecmp(value, "1")) Sets.color = 1;