mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-31 10:46:21 +00:00
@@ -176,7 +176,7 @@ autocomplete_param_with_func(char *input, int *size, char *command,
|
|||||||
char *auto_msg = NULL;
|
char *auto_msg = NULL;
|
||||||
char inp_cpy[*size];
|
char inp_cpy[*size];
|
||||||
int i;
|
int i;
|
||||||
char *command_cpy = malloc(strlen(command) + 2);
|
char command_cpy[strlen(command) + 2];
|
||||||
sprintf(command_cpy, "%s ", command);
|
sprintf(command_cpy, "%s ", command);
|
||||||
int len = strlen(command_cpy);
|
int len = strlen(command_cpy);
|
||||||
if ((strncmp(input, command_cpy, len) == 0) && (*size > len)) {
|
if ((strncmp(input, command_cpy, len) == 0) && (*size > len)) {
|
||||||
@@ -192,7 +192,6 @@ autocomplete_param_with_func(char *input, int *size, char *command,
|
|||||||
free(found);
|
free(found);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(command_cpy);
|
|
||||||
|
|
||||||
return auto_msg;
|
return auto_msg;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user