diff options
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-ot-shaper-indic.cc')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-ot-shaper-indic.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shaper-indic.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shaper-indic.cc index 7652210d9d..f8c970fc3e 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shaper-indic.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shaper-indic.cc @@ -482,9 +482,7 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, is_one_of (info[start+2], FLAG (I_Cat(ZWJ)))) { buffer->merge_clusters (start+1, start+3); - hb_glyph_info_t tmp = info[start+1]; - info[start+1] = info[start+2]; - info[start+2] = tmp; + hb_swap (info[start+1], info[start+2]); } /* 1. Find base consonant: @@ -1069,12 +1067,15 @@ final_reordering_syllable_indic (const hb_ot_shape_plan_t *plan, base = i; while (base < end && is_halant (info[base])) base++; - info[base].indic_position() = POS_BASE_C; + if (base < end) + info[base].indic_position() = POS_BASE_C; try_pref = false; } break; } + if (base == end) + break; } /* For Malayalam, skip over unformed below- (but NOT post-) forms. */ if (buffer->props.script == HB_SCRIPT_MALAYALAM) |