From a9668ab004ff2f50ae8556fc4982ef6303f8d7ee Mon Sep 17 00:00:00 2001 From: roodyyogurt Date: Tue, 18 Jun 2024 14:53:53 -0500 Subject: [PATCH] Update heparse.c Fixes a bug that comes up if someone refers to a known object not in scope that shares an adjective with another known out of scope object. Without the fix, the first defined object always gets sent to ParseError, ignoring the difference of nouns and such. --- hugo/heparse.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hugo/heparse.c b/hugo/heparse.c index 6f08e55..96e9221 100644 --- a/hugo/heparse.c +++ b/hugo/heparse.c @@ -1087,7 +1087,12 @@ int MatchObject(int *wordnum) /* definitely not this object */ else + { SubtractPossibleObject(i); + /* clear bestobj if i is the current best object */ + if (i == bestobj) + bestobj = 0; + } }