File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,9 @@ pub fn match_lookahead(
170
170
start_index : usize ,
171
171
end_index : & mut usize ,
172
172
) -> bool {
173
+ // Function should always be called with a non-zero starting index
174
+ // c.f. https://github.com/harfbuzz/rustybuzz/issues/142
175
+ assert ! ( start_index >= 1 ) ;
173
176
let mut iter = skipping_iterator_t:: new ( ctx, start_index - 1 , true ) ;
174
177
iter. set_glyph_data ( 0 ) ;
175
178
iter. enable_matching ( match_func) ;
@@ -1316,6 +1319,8 @@ pub fn ligate_input(
1316
1319
if this_comp == 0 {
1317
1320
this_comp = last_num_comps;
1318
1321
}
1322
+ // c.f. https://github.com/harfbuzz/rustybuzz/issues/142
1323
+ assert ! ( comps_so_far >= last_num_comps) ;
1319
1324
let new_lig_comp = comps_so_far - last_num_comps + this_comp. min ( last_num_comps) ;
1320
1325
_hb_glyph_info_set_lig_props_for_mark ( cur, lig_id, new_lig_comp) ;
1321
1326
}
@@ -1344,6 +1349,8 @@ pub fn ligate_input(
1344
1349
break ;
1345
1350
}
1346
1351
1352
+ // c.f. https://github.com/harfbuzz/rustybuzz/issues/142
1353
+ assert ! ( comps_so_far >= last_num_comps) ;
1347
1354
let new_lig_comp = comps_so_far - last_num_comps + this_comp. min ( last_num_comps) ;
1348
1355
_hb_glyph_info_set_lig_props_for_mark ( info, lig_id, new_lig_comp)
1349
1356
}
You can’t perform that action at this time.
0 commit comments