b8e33560f9
## Summary of the Pull Request Fixes a flaw that happened if `til::u8u16` received a single lead byte. ## PR Checklist * [x] Closes #4673 * [x] Tests added/passed ## Detailed Description of the Pull Request / Additional comments The loop for caching partials didn't run and thus, the lead byte was converted to U+FFFD. That's because the loop starts with `sequenceLen` initialized with 1. And if the string has a length of 1 the initial condition is `1<1` which is evaluated to `false` and the body of the loop was never executed. ## Validation Steps Performed 1) updated the code of the state class and tested manually that `printf "\xE2"; printf "\x98\xBA\n"` prints a U+263A character 2) updated the unit tests to make sure that still up to 3 partials are cached 3) updated the unit tests to make sure caching also works if the string consists of a lead byte only 4) tested manually that #4086 is still resolved |
||
---|---|---|
.. | ||
ut_til | ||
dirs | ||
precomp.cpp | ||
precomp.h |