home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
739a395
)
Added client commands config error check condition: third token longer than one char.
author
Christian Heller
<c.heller@plomlompom.de>
Sat, 25 Jan 2014 22:57:00 +0000
(23:57 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sat, 25 Jan 2014 22:57:00 +0000
(23:57 +0100)
src/client/command_db.c
patch
|
blob
|
history
diff --git
a/src/client/command_db.c
b/src/client/command_db.c
index 79c5a8aa47a6cac9712c2f24681eed8f7af6fb28..19cd4064e09c7878d49d841ed1e86d30536ffc58 100644
(file)
--- 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];