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.
This commit is contained in:
parent
acdfa96315
commit
cf4adf8d02
1 changed files with 1 additions and 2 deletions
3
misc.c
3
misc.c
|
@ -514,8 +514,7 @@ static void tokenize(char *raw, command_t *cmd) {
|
||||||
* possible an emulation of the original UI.
|
* possible an emulation of the original UI.
|
||||||
*/
|
*/
|
||||||
if (settings.oldstyle) {
|
if (settings.oldstyle) {
|
||||||
cmd->word[0].raw[TOKLEN + TOKLEN] =
|
cmd->word[0].raw[TOKLEN] = cmd->word[1].raw[TOKLEN] = '\0';
|
||||||
cmd->word[1].raw[TOKLEN + TOKLEN] = '\0';
|
|
||||||
for (size_t i = 0; i < strlen(cmd->word[0].raw); i++) {
|
for (size_t i = 0; i < strlen(cmd->word[0].raw); i++) {
|
||||||
cmd->word[0].raw[i] = toupper(cmd->word[0].raw[i]);
|
cmd->word[0].raw[i] = toupper(cmd->word[0].raw[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue