diff options
-rw-r--r-- | command.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -362,7 +362,8 @@ bool handle_input_line(struct conn_data *data,char *line,size_t linelen){ size_t cmdlen=sepp-line; size_t cmdi; for(cmdi=0;cmdi<NCOMMANDS;cmdi++){ - if(strncmp(line,commands[cmdi].cmdname,cmdlen)==0){ + if(cmdlen==strlen(commands[cmdi].cmdname)&& + memcmp(line,commands[cmdi].cmdname,cmdlen)==0){ break; } } |