diff --git a/src/components/gfx/text/shaping/harfbuzz.rs b/src/components/gfx/text/shaping/harfbuzz.rs index 0708ead5e2c..7ed2fb93f47 100644 --- a/src/components/gfx/text/shaping/harfbuzz.rs +++ b/src/components/gfx/text/shaping/harfbuzz.rs @@ -334,7 +334,7 @@ impl Shaper { let mut max_glyph_idx = glyph_span.end(); for i in char_byte_span.eachi() { if byteToGlyph[i] > NO_GLYPH { - max_glyph_idx = uint::max(byteToGlyph[i] as uint, max_glyph_idx); + max_glyph_idx = uint::max(byteToGlyph[i] as uint + 1, max_glyph_idx); } }