From cf4adf8d028e75e041abe4850259edad54171264 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 20 Sep 2024 10:49:44 -0400 Subject: [PATCH] Repair truncation in oldstyle mode. Sure would be nice to remember while this code had TOKEN + TOKEN where one would think it should just say TOKEN. --- misc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc.c b/misc.c index aa11786..533735b 100644 --- a/misc.c +++ b/misc.c @@ -514,8 +514,7 @@ static void tokenize(char *raw, command_t *cmd) { * possible an emulation of the original UI. */ if (settings.oldstyle) { - cmd->word[0].raw[TOKLEN + TOKLEN] = - cmd->word[1].raw[TOKLEN + TOKLEN] = '\0'; + cmd->word[0].raw[TOKLEN] = cmd->word[1].raw[TOKLEN] = '\0'; for (size_t i = 0; i < strlen(cmd->word[0].raw); i++) { cmd->word[0].raw[i] = toupper(cmd->word[0].raw[i]); } -- 2.31.1