Does this help? I do not really remember what I wrote back then
current_property->comb_index != UINT16_MAX &&
current_property->comb_index >= 0x8000) {
int sidx = starter_property->comb_index;
- int idx = (current_property->comb_index & 0x3FFF) - utf8proc_combinations[sidx];
- if (idx >= 0 && idx <= utf8proc_combinations[sidx + 1] ) {
- idx += sidx + 2;
+ int idx = current_property->comb_index & 0x3FFF;
+ if (idx >= utf8proc_combinations[sidx] && idx <= utf8proc_combinations[sidx + 1] ) {
+ idx += sidx + 2 - utf8proc_combinations[sidx];
if (current_property->comb_index & 0x4000) {
composition = (utf8proc_combinations[idx] << 16) | utf8proc_combinations[idx+1];
} else