git.shiar.nl
/
netris.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e155d9
)
fix default value for --dropmode
author
Mischa POSLAWSKY
<netris@shiar.org>
Sun, 4 Mar 2007 07:13:50 +0000
(08:13 +0100)
committer
Mischa POSLAWSKY
<netris@shiar.org>
Sun, 4 Mar 2007 07:13:50 +0000
(08:13 +0100)
Caused segfault on missing value (i.e. netris -d)
game.c
patch
|
blob
|
history
diff --git
a/game.c
b/game.c
index a5a72ad8a45d5b9bf30c36e783eb6e6f0790a838..b9d83f4afa31e44fd1e1809f731aa4af127d2d36 100644
(file)
--- 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;