aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flood.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/flood.c b/flood.c
index 441119c..77eb48a 100644
--- a/flood.c
+++ b/flood.c
@@ -141,13 +141,13 @@ static void decode_params(game_params *ret, char const *string)
if (*string == 'c') {
string++;
ret->colours = atoi(string);
- while (string[1] && isdigit((unsigned char)string[1])) string++;
+ while (*string && isdigit((unsigned char)*string)) string++;
} else if (*string == 'm') {
string++;
ret->leniency = atoi(string);
- while (string[1] && isdigit((unsigned char)string[1])) string++;
- }
- string++;
+ while (*string && isdigit((unsigned char)*string)) string++;
+ } else
+ string++;
}
}