From: Eric S. Raymond Date: Wed, 14 Jun 2017 19:15:00 +0000 (-0400) Subject: Fix handling of intransitive "say". X-Git-Tag: 1.1~319 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=7c9a0bfb36e0c630d6056e5897d00a8d54317261;p=open-adventure.git Fix handling of intransitive "say". --- diff --git a/Makefile b/Makefile index 31f35a9..b8b8221 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ VERS=1.0 CC?=gcc -CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE -Wall -Wpedantic +CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE -Wall -Wpedantic -g LIBS= UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) diff --git a/actions.c b/actions.c index d0608f6..5197250 100644 --- a/actions.c +++ b/actions.c @@ -1051,7 +1051,7 @@ int action(FILE *input, enum speechpart part, long verb, token_t obj) case intransitive: if (WD2 > 0 && verb != SAY) return(2800); if (verb == SAY)obj=WD2; - if (obj == 0) { + if (obj == 0 || obj == INTRANSITIVE) { /* Analyse an intransitive verb (ie, no object given yet). */ switch (verb-1) { case 0: /* CARRY */ return carry(verb, INTRANSITIVE); diff --git a/tests/woodshint.chk b/tests/woodshint.chk index d58fc6b..d785236 100644 --- a/tests/woodshint.chk +++ b/tests/woodshint.chk @@ -115,11 +115,11 @@ Drop what? > say -Okay, "SAY". +Say what? > nothing -OK +Okay, "NOTHI". > wave