-
Notifications
You must be signed in to change notification settings - Fork 11
Description
I'm not sure this is of interest for your goals of preserving the original gameplay but here goes:
If you enter a bare verb (single word) for a verb that expects an accompanying noun, you generally get a response like You don't have it with you. or That would be a neat trick.
UNLO (unlock) doesn't produce any output. Hitting return will give you the expected I didn't get that!! response. The game isn't hung but you'd never know from looking at it.
I'm not sure if this is a bug in the transcription or just an oversight in the original coding. I tested this on the patches branch, latest commit (ca1aac9) with and without asa. I'm building with gfortran 10.2.0 on both OSX and Windows 10, and 9.3.0 on Linux; I see the same behavior on all three.
tl; dr This came up during testing while modernizing the code from F66 (with a sprinkling of F77) to F2018. Eleven bare verbs were causing segfaults by setting ACTION(2) to zero and passing it upstream to main. In main, ACTION(2) is aliased to OBJECT and in some cases this is used to index an array. Fortran array indices start at 1 (unless otherwise changed but that's F90 onward). I believe legacy behavior is to return a 0 or blank for an index of zero which might be why the code isn't segfaulting (I may have broken something while refactoring fread and input) The other bare verbs that I've seen segfault are
11 T/TAKE
12 DROP
17 THRO
20 SHOW/WAVE
24 DRIN
30 UNLO
32 LIGH
34 EXTI
38 WATE
39 POUR
49 FILL
In your unmodified code, the only issue I found was with UNLO; the others seem ok.