|Anonymous | Login | Signup for a new account||2019-04-21 23:34 PDT|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001160||Core Inform||Understanding||public||2013-12-23 15:48||2014-05-07 07:34|
|Target Version||Fixed in Version||6L02|
|Summary||0001160: Preposition look-ahead can run off the buffer|
|Description||The code below generates the exceptionally confusing response "What do you want to drop the rock on those things?"|
(From forum thread: http://www.intfiction.org/forum/viewtopic.php?f=7&t=10785 [^] . That thread started with the command "drop rock on down", which runs into the same problem. However, the word or compass direction "down" is a red herring, as this case demonstrates.)
Things go wrong at the parser point marked "[Trying look-ahead]" (in trace output). I don't completely understand the logic, but there are too many calls to NextWord() in this case; wn winds up equal to 6. The line marked "put back the non-preposition we just read" decrements it to 5, but this is still beyond the end of the buffer (num_words=4).
We wind up calling NounDomain() on, effectively, the empty string. (There are zero words available at wn=5.) It is not designed for this sort of abuse, and winds up matching every object in scope (match_from=5, match_length=0). The parser tries to print a disambiguation message, and that's the symptom noted above.
|Minimal Source Text To Reproduce|
The Kitchen is a room. The table is a supporter in the Kitchen. The player carries a rock. The player carries a stone. Test me with "drop rock on into".
|Tags||No tags attached.|
|Effect||(serious/mild) Game compiles but misbehaves|
|I see that bug http://inform7.com/mantis/view.php?id=636 [^] is in the same area of code, but it seems to be unrelated. At least, that code path is not triggered by this case. Possibly it should be.|
Fixed. For the benefit of I6 library people: the final line of the do... until loop, which used to read "l=NextWord()", wants to be:
if (wn <= num_words) l = NextWord();
thus preventing us from running headlong off the cliff.
|2013-12-23 15:48||zarf||New Issue|
|2013-12-23 15:52||zarf||Note Added: 0002196|
|2013-12-25 16:22||EmacsUser||Status||new => confirmed|
|2014-01-18 16:45||graham||Note Added: 0002315|
|2014-01-18 16:45||graham||Status||confirmed => resolved|
|2014-01-18 16:45||graham||Resolution||open => fixed|
|2014-01-18 16:45||graham||Assigned To||=> graham|
|2014-05-07 07:34||jmcgrew||Fixed in Version||=> 6L02|
|2014-05-07 07:34||jmcgrew||Status||resolved => closed|
|Copyright © 2000 - 2010 MantisBT Group|