I’ve gotten a bit further with hunting this bug. I compiled the same source with both Linux and Windows and compared the resulting .hex files. The only difference was in the part that corresponds to the Hugo Library’s line 1005 in hugolib.h:
if VerbWord = "give", "offer", "hand", "show"
This code is reached when the parser returns error number 5 which happens when the noun part of the command doesn’t match anything but consists of multiple valid dictionary words. Normally it would reply with either “Not sure what you’re referring to” or “You haven’t encountered anything like that” error message. So in addition to referring to an object with two different synonyms it’ll also crash when you repeat a word (X FOX FOX) or use the names of two separate objects (X FOX ME).
When compiling on Linux the above line compiles to this (made more readable by replacing hex codes with token names and actual dictionary words):
if routine#0x9e0 = dictEntry#"give" or
routine#0x-810 = dictEntry#"offer" or
routine#0x-810 = dictEntry#"hand" or
routine#0x-810 = dictEntry#"show"
The first routine address is correct, the rest are nonsensical. As soon as an interpreter tries to look up a negative routine address, it crashes. The Windows version uses the 0x9e0 address for all of them. Routine#0x9e0 returns the value of VerbWord.
I haven’t figured out yet what the actual bug in the compiler is but I assume it’s somewhere in hccode.c at around line 954 which looks like it handles the comma shortcut.
Before the compiler is fixed the workaround is to avoid the if x = a, b, c
shortcut and write it fully as if x = a or x = b or x = c
instead. Line 1005 in hugolib.h can be rewritten as:
if VerbWord = "give" or VerbWord = "offer" or VerbWord = "hand" or VerbWord = "show"