summaryrefslogtreecommitdiff
path: root/web/web_opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/web_opts.c')
-rw-r--r--web/web_opts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/web_opts.c b/web/web_opts.c
index b880fd3..18a8c2a 100644
--- a/web/web_opts.c
+++ b/web/web_opts.c
@@ -19,12 +19,12 @@ static int difficulty = 32;
static void set_delay(char *val)
{
- delay_ms = atoi(val);
+ delay_ms = val ? atoi(val) : 0;
}
static void set_difficulty(char *val)
{
- int diff = atoi(val);
+ int diff = val ? atoi(val) : 0;
difficulty = diff < 0 ? 0 : diff > 99 ? 99 : diff;
comp_set_difficulty(difficulty);