From: Christian Heller Date: Sun, 7 Dec 2014 02:21:34 +0000 (+0100) Subject: Server: Don't segfault on lack of THINGS_HERE arguments. X-Git-Tag: tce~569 X-Git-Url: https://plomlompom.com/repos/balance?a=commitdiff_plain;h=b774672163cc6a1ad21b4958d3b2e8b903cd0ba2;p=plomrogue Server: Don't segfault on lack of THINGS_HERE arguments. --- diff --git a/src/server/run.c b/src/server/run.c index 339a849..9163ee0 100644 --- a/src/server/run.c +++ b/src/server/run.c @@ -212,7 +212,7 @@ static uint8_t parse_command_meta(char * tok0) { char * tok1 = token_from_line(NULL); char * tok2 = token_from_line(NULL); - if (!parsetest_int(tok1, '8') && !parsetest_int(tok2, '8')) + if (tok1&&tok2 && !parsetest_int(tok1, '8')&&!parsetest_int(tok2, '8')) { send_to_outfile("THINGS_HERE START\n", 1); struct Thing * t;