Fix reading hash table entries > 128.

This is related to ebfa320956, but
when reading the hash chain entry length, not writing it.

If char is signed, then before this change the length would be
negative, causing problems loading the dictionary.
This commit is contained in:
Reece H. Dunn
2017-07-26 21:11:44 +01:00
parent ebfa320956
commit 22270bd259
+1 -1
View File
@@ -254,7 +254,7 @@ int LoadDictionary(Translator *tr, const char *name, int no_error)
for (hash = 0; hash < N_HASH_DICT; hash++) {
tr->dict_hashtab[hash] = p;
while ((length = *p) != 0)
while ((length = *(uint8_t *)p) != 0)
p += length;
p++; // skip over the zero which terminates the list for this hash value
}