From 7c53467246e3feef75803ac8ce919d06413e0ef1 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 12 Oct 2012 00:27:38 -0700 Subject: [PATCH] Fix the indexes used in get_detailed_glyphs_for_entry I haven't looked at exactly what is going on here, but these indexes work better for me on linux --- src/servo/text/glyph.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/servo/text/glyph.rs b/src/servo/text/glyph.rs index cc226b202b1..35fede210b2 100644 --- a/src/servo/text/glyph.rs +++ b/src/servo/text/glyph.rs @@ -332,9 +332,9 @@ impl DetailedGlyphStore { None => fail ~"Invalid index not found in detailed glyph lookup table!", Some(i) => { do self.detail_buffer.borrow |glyphs : &[DetailedGlyph]| { - assert i + (count as uint) < glyphs.len(); + assert i + (count as uint) <= glyphs.len(); // return a view into the buffer - vec::view(glyphs, i, count as uint) + vec::view(glyphs, i, i + count as uint) } } }