Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra copies of dictionary words in z3 #36

Closed
fredrikr opened this issue Sep 10, 2020 · 1 comment
Closed

Extra copies of dictionary words in z3 #36

fredrikr opened this issue Sep 10, 2020 · 1 comment

Comments

@fredrikr
Copy link

If you compile a game to z3, and there are two dictionary words in the source code which are not different with the six-character resolution of z3, but would be different if the resolution was 9 characters as in z5, they are created as separate dictionary words, which causes all sorts of problems. Example:

Object Scorpion "scorpion"
with
name 'scorpionx' 'scorpiony';

This creates two dictionary words: 'scorpi' and 'scorpi' (truncated to six characters). Depending on the interpreter's method of searching the dictionary, one or the other may be matched when the player type a word beginning with scorpi.

@erkyrath
Copy link
Contributor

I think the fix would be to add a version_number check to the line

if (i>=9) break;

...in dictionary_prepare_z()?

erkyrath pushed a commit to erkyrath/Inform6 that referenced this issue Sep 13, 2020
DavidKinder#36

In v3, dict words are now truncated at 6 z-chars as they are constructed
(instead of 9).

Compiler test: https://github.com/erkyrath/glk-dev/blob/master/unittests/dict-size-v3test.inf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants