home · contact · privacy
Added client commands config error check condition: third token longer than one char.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 25 Jan 2014 22:57:00 +0000 (23:57 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 25 Jan 2014 22:57:00 +0000 (23:57 +0100)
src/client/command_db.c

index 79c5a8aa47a6cac9712c2f24681eed8f7af6fb28..19cd4064e09c7878d49d841ed1e86d30536ffc58 100644 (file)
@@ -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];