liblouis
liblouis copied to clipboard
compileTranslationTable: Check replacement characters []
We can check at compile-time that we always have exactly one startReplace character followed by one endReplace.
This is needed otherwise when a table misses the endReplace (as tables/hu-hu-g1_braille_input.cti fixed here), match has startReplace != -1 but endReplace == -1, and eventually passDoAction sets newPos to -1, and other functions such as setBefore underflow the buffer.
Nice find.