diff --git a/inform.c b/inform.c index f8c1275..862f9ec 100644 --- a/inform.c +++ b/inform.c @@ -181,7 +181,7 @@ static void select_target(int targ) /* The Z-code generator doesn't use the following variables, although it would be a little cleaner if it did. */ OBJECT_BYTE_LENGTH = 0; - DICT_ENTRY_BYTE_LENGTH = 0; + DICT_ENTRY_BYTE_LENGTH = (version_number==3)?7:9; DICT_ENTRY_FLAG_POS = 0; } else { @@ -193,7 +193,7 @@ static void select_target(int targ) DICT_ENTRY_FLAG_POS = (1+DICT_WORD_BYTES); } else { - DICT_ENTRY_BYTE_LENGTH = (10+DICT_WORD_BYTES); + DICT_ENTRY_BYTE_LENGTH = (12+DICT_WORD_BYTES); DICT_ENTRY_FLAG_POS = (4+DICT_WORD_BYTES); } } diff --git a/symbols.c b/symbols.c index a569a7d..1a6881d 100644 --- a/symbols.c +++ b/symbols.c @@ -560,6 +560,7 @@ static void stockup_symbols(void) } create_symbol("WORDSIZE", WORDSIZE, CONSTANT_T); + create_symbol("DICT_ENTRY_BYTES", DICT_ENTRY_BYTE_LENGTH, CONSTANT_T); if (!glulx_mode) { create_symbol("DICT_WORD_SIZE", ((version_number==3)?4:6), CONSTANT_T); create_symbol("NUM_ATTR_BYTES", ((version_number==3)?4:6), CONSTANT_T); diff --git a/tables.c b/tables.c index 5f6a28e..c66c7ed 100644 --- a/tables.c +++ b/tables.c @@ -1445,6 +1445,12 @@ table format requested (producing number 2 format instead)"); mark += no_actions*4; /* Values to be written in later. */ + if (DICT_CHAR_SIZE != 1) { + /* If the dictionary is Unicode, we'd like it to be word-aligned. */ + while (mark % 4) + p[mark++]=0; + } + preactions_at = mark; adjectives_offset = mark; dictionary_offset = mark;