the-infocom-files / suspect

Suspect
3 stars 2 forks source link

Slapping an object that's not in the current room prints garbage #17

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>SLAP WEATHER
What     c             qm inmurder the ?

This is what V-SLAP looks like:

<ROUTINE V-SLAP ()
     <COND (<NOT <IN? ,PRSO ,HERE>>
        <TELL "What " ,PRSO "?" CR>)
           (<FSET? ,PRSO ,PERSON>
        <TELL
CD ,PRSO " slaps you right back. It hurts, too." CR>)
           (T
        <TELL
"Your hand stings something fierce now!" CR>)>>

It should presumably be <TELL "What " 'PRSO "?" CR> instead, i.e. 'PRSO, not ,PRSO.

It doesn't happen in the official Release 14. The archived source for that version looks like this:

<ROUTINE V-SLAP ()
     <COND (<FSET? ,PRSO ,PERSON>
        <TELL
CD ,PRSO " slaps you right back. It hurts, too." CR>)
           (T
        <TELL
"Your hand stings something fierce now!" CR>)>>
eriktorbjorn commented 4 years ago

Actually, the IN? check seems weird to me. Now you can't slap anything in your inventory.