From: Eric S. Raymond Date: Fri, 20 Sep 2024 14:49:44 +0000 (-0400) Subject: Repair truncation in oldstyle mode. X-Git-Tag: 1.20~15 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=cf4adf8d028e75e041abe4850259edad54171264;p=open-adventure.git 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. --- 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]); }