diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-06-02 02:43:58 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-06-02 02:43:58 -0700 |
commit | 823b81363a1145de4b8660153007b11faf4e2c56 (patch) | |
tree | 09d9c70e232c1b98ec8447cae6b6618bcd91497d /web/web_opts.c | |
parent | 1db534799ef5b41114d80fce0c38f1c93235a8a3 (diff) | |
download | dartboat-823b81363a1145de4b8660153007b11faf4e2c56.tar.gz dartboat-823b81363a1145de4b8660153007b11faf4e2c56.tar.xz |
web: fix minor mem leaks and bugs
Diffstat (limited to 'web/web_opts.c')
-rw-r--r-- | web/web_opts.c | 4 |
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); |