From 08c40bc9993ce5684077b9ceac492e4fb642a722 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 20 Jul 2017 09:50:58 -0400 Subject: [PATCH] Eliminate last logic guard on a packed value. --- actions.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/actions.c b/actions.c index 682b03b..5433a7d 100644 --- a/actions.c +++ b/actions.c @@ -1355,7 +1355,10 @@ int action(struct command_t *command) if (command->raw2[0] != '\0' && command->verb != SAY) return GO_WORD2; if (command->verb == SAY) - command->obj = command->wd2; + /* KEYS is not special, anything not NO_OBJECT or INTRANSITIVE + * will do here. We're preventing interpretation as an intransitive + * verb when the word is unknown. */ + command->obj = command->raw2[0] != '\0' ? KEYS : NO_OBJECT; if (command->obj == NO_OBJECT || command->obj == INTRANSITIVE) { /* Analyse an intransitive verb (ie, no object given yet). */ -- 2.31.1