Commit 44432fa7 authored by Dylan Ede's avatar Dylan Ede Committed by GitHub
Browse files

Merge pull request #5 from mitchmindtree/overflow_fix

Fix `attempt to subtract with overflow` error in `get_glyph_kern_advance`
parents cb7ae460 b4849e97
......@@ -791,7 +791,7 @@ impl<Data: Deref<Target=[u8]>> FontInfo<Data> {
}
let mut l: i32 = 0;
let mut r: i32 = (BE::read_u16(&kern[10..]) - 1) as i32;
let mut r: i32 = BE::read_u16(&kern[10..]) as i32 - 1;
let needle = glyph_1 << 16 | glyph_2;
while l <= r {
let m = (l + r) >> 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment