Index: third_party/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc |
diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc |
index b48fb561c395e8460f34e4309243babe673884da..ec12ce69e0b37ff7ff17b6ad658d1dbc404c64da 100644 |
--- a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc |
+++ b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc |
@@ -1497,7 +1497,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan, |
if (reph_pos == REPH_POS_AFTER_SUB) |
{ |
new_reph_pos = base; |
- while (new_reph_pos < end && |
+ while (new_reph_pos + 1 < end && |
!( FLAG_SAFE (info[new_reph_pos + 1].indic_position()) & (FLAG (POS_POST_C) | FLAG (POS_AFTER_POST) | FLAG (POS_SMVD)))) |
new_reph_pos++; |
if (new_reph_pos < end) |