cleanup: add a defensive check in cmd_process_input()

This commit is contained in:
Michael Vetter
2026-02-27 19:36:47 +01:00
parent d8a7b234bb
commit f74501e97e

View File

@@ -154,6 +154,9 @@ cmd_process_input(ProfWin* window, char* inp)
if (inp[0] == '/') {
auto_char char* inp_cpy = strdup(inp);
char* command = strtok(inp_cpy, " ");
if (!command) {
return TRUE;
}
char* question_mark = strchr(command, '?');
if (question_mark) {
*question_mark = '\0';