X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Ftext.c;h=8a1ae31058614acefb4d4832484545d76eb9089b;hb=8760c1ba6442153afe76bcac742e086f90c59fe8;hp=31612387929280e1516df021592ac09109cf2e4b;hpb=e536ce9e39cc1bfa82ecd1d6d73f874af655f9db;p=inform.git diff --git a/src/text.c b/src/text.c index 3161238..8a1ae31 100644 --- a/src/text.c +++ b/src/text.c @@ -1,9 +1,8 @@ /* ------------------------------------------------------------------------- */ /* "text" : Text translation, the abbreviations optimiser, the dictionary */ /* */ -/* Copyright (c) Graham Nelson 1993 - 2020 */ -/* */ -/* This file is part of Inform. */ +/* Part of Inform 6.35 */ +/* copyright (c) Graham Nelson 1993 - 2020 */ /* */ /* Inform is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ @@ -16,7 +15,7 @@ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ -/* along with Inform. If not, see https://gnu.org/licenses/ */ +/* along with Inform. If not, see https://gnu.org/licenses/ * /* */ /* ------------------------------------------------------------------------- */ @@ -1573,6 +1572,8 @@ static void dictionary_prepare_z(char *dword, uchar *optresult) applying to the text of dictionary entries: first produce a sequence of 6 (v3) or 9 (v4+) Z-characters */ + int dictsize = (version_number==3) ? 6 : 9; + number_and_case = 0; for (i=0, j=0; dword[j]!=0; i++, j++) @@ -1588,7 +1589,7 @@ to give number of dictionary word", dword); } break; } - if (i>=9) break; + if (i>=dictsize) break; k=(int) dword[j]; if (k==(int) '\'')