From: Christian Heller Date: Sat, 25 Jan 2014 22:57:00 +0000 (+0100) Subject: Added client commands config error check condition: third token longer than one char. X-Git-Tag: tce~856 X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/bar%20baz.html?a=commitdiff_plain;h=d61da76579b416799feb44bfb9a1e75ce1a58067;p=plomrogue Added client commands config error check condition: third token longer than one char. --- diff --git a/src/client/command_db.c b/src/client/command_db.c index 79c5a8a..19cd406 100644 --- a/src/client/command_db.c +++ b/src/client/command_db.c @@ -94,9 +94,10 @@ extern void init_command_db() sprintf(line_copy, "%s", line); struct Command cmd; char * arg_string; - exit_err(( copy_tokenized_string(line, &cmd.dsc_short, delim) + exit_err(( copy_tokenized_string(line, &cmd.dsc_short, delim) || copy_tokenized_string(NULL, &cmd.server_msg, delim) || NULL == (arg_string = strtok(NULL, delim)) + || strlen(arg_string) > 1 || copy_tokenized_string(NULL, &cmd.dsc_long, "\n")), init_command_db_err(line_copy, i + 1)); cmd.arg = arg_string[0];