diff --git a/src/libespeak-ng/dictionary.c b/src/libespeak-ng/dictionary.c index 2d159795..4bad719f 100644 --- a/src/libespeak-ng/dictionary.c +++ b/src/libespeak-ng/dictionary.c @@ -2607,7 +2607,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor // This corresponds to the last matching entry in the *_list file. while (*p != 0) { - next = p + p[0]; + next = p + (p[0] & 0xff); if (((p[1] & 0x7f) != wlen) || (memcmp(word, &p[2], wlen & 0x3f) != 0)) { // bit 6 of wlen indicates whether the word has been compressed; so we need to match on this also. diff --git a/tests/translate.test b/tests/translate.test index 6dcf6384..5a584ef5 100755 --- a/tests/translate.test +++ b/tests/translate.test @@ -18,6 +18,9 @@ test_phonemes en " h@l'oU" "hello" # correct word stress test_phonemes en " s'VmTIN Imp'o@t@nt" "something important" +# bug: https://github.com/nvaccess/nvda/issues/7740 +test_phonemes ta " 'il." "ள்" + # bug: https://github.com/nvaccess/nvda/issues/7805 test_phonemes hi " r'UcI" "रुचि" test_phonemes hi " dUk'a:n" "दुकान"