Commit Graph
6 Commits
Author SHA1 Message Date
Reece H. Dunn a29d3f642c Test my and ka handling of long emoji names, and number pronunciation previously broken by that support. 2018-03-25 16:16:48 +01:00
Reece H. Dunn 566e904b33 LookupDict2: Fix searching entries longer than 128
This is a fix for https://github.com/nvaccess/nvda/issues/7740.

With the addition of emoji support, dictionary entries can now be
longer than 128 bytes. This fix makes sure the character is
interpreted as an unsigned byte so it does not treat long entries
as having a negative offset.

Treating the offset as a signed byte (like in the previous code)
could cause the hash chain search to loop indefinitely when
processing certain input, like the Tamil characters in the NVDA
issue noted above that is added as a test case to translate.test.
2018-03-25 12:52:22 +01:00
Reece H. Dunn 81cfcecfe7 tests: remove a todo comment that is not relevant (it was added by mistake) 2018-03-15 07:20:09 +00:00
Reece H. Dunn eaa08a2bc3 translate: Don't crash translating root words that map to another list entry.
If the list file contains a text replacement to another
entry in the list file, e.g.:

	ripost     riposte $text
	riposte    rI#p0st

calling it from a prefix or suffix rule such as 'riposted'
causes word_out[0] to be NULL, as TranslateWord3 has the
information needed to perform the mapping. In this case,
no phonemes have been written in this loop and the phonemes
have been calculated, so don't override them.
2018-03-11 17:58:15 +00:00
Reece H. Dunn ad4155e705 tests: Add test cases for NVDA issue 7805. 2018-03-11 16:11:34 +00:00
Reece H. Dunn 15190d4de1 tests: rename {phoneme-output => translate}.test 2018-03-11 14:08:10 +00:00