[unsafe-to-concat] Fix PairPos2 logic

Test failures down from 8 to 6:

113/400 harfbuzz:shaping+in-house / mongolian-variation-selector FAIL             0.06s   exit status 1
203/400 harfbuzz:shaping+aots / gpos3                            FAIL             0.06s   exit status 1
204/400 harfbuzz:shaping+aots / gpos4_lookupflag                 FAIL             0.06s   exit status 1
260/400 harfbuzz:shaping+aots / gsub4_1_multiple_ligatures       FAIL             0.06s   exit status 1
264/400 harfbuzz:shaping+aots / lookupflag_ignore_attach         FAIL             0.06s   exit status 1
266/400 harfbuzz:shaping+aots / lookupflag_ignore_combination    FAIL             0.06s   exit status 1
This commit is contained in:
Behdad Esfahbod 2022-01-21 12:18:50 -07:00
parent c0058892be
commit 48c5f26199
1 changed files with 7 additions and 3 deletions

View File

@ -1574,7 +1574,11 @@ struct PairPosFormat2
unsigned int klass1 = (this+classDef1).get_class (buffer->cur().codepoint);
unsigned int klass2 = (this+classDef2).get_class (buffer->info[skippy_iter.idx].codepoint);
if (unlikely (klass1 >= class1Count || klass2 >= class2Count)) return_trace (false);
if (unlikely (klass1 >= class1Count || klass2 >= class2Count))
{
buffer->unsafe_to_concat (buffer->idx, skippy_iter.idx + 1);
return_trace (false);
}
const Value *v = &values[record_len * (klass1 * class2Count + klass2)];
@ -1642,9 +1646,9 @@ struct PairPosFormat2
if (applied_first || applied_second)
buffer->unsafe_to_break (buffer->idx, skippy_iter.idx + 1);
else
buffer->unsafe_to_concat (buffer->idx, skippy_iter.idx + 1);
boring:
buffer->unsafe_to_concat (buffer->idx, skippy_iter.idx + 1);
buffer->idx = skippy_iter.idx;
if (len2)