From 7ff153d0ac39a5dc2657eb121a5ab988dfea653b Mon Sep 17 00:00:00 2001 From: Stas Sergeev Date: Thu, 11 Jul 2024 11:21:24 +0300 Subject: [PATCH] fix another regression of 234e221d --- src/command.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/command.c b/src/command.c index 0e3897e..464a365 100644 --- a/src/command.c +++ b/src/command.c @@ -536,7 +536,10 @@ static void advance_cmd_arg(void) while (*extr == ' ' || *extr == '\t') extr++; if (*extr == '\0') + { + cmd_args[0] = '\0'; goto NoArgs; + } while (*extr != ' ' && *extr != '\t' && *extr != '\0') { @@ -545,7 +548,10 @@ static void advance_cmd_arg(void) break; } if (*extr == '\0') + { + cmd_args[0] = '\0'; goto NoArgs; + } if (*extr == ';') { memmove(cmd_args, extr, strlen(extr)+1);