Skip to content

Commit 880eb46

Browse files
committed
[graphite2] Use signed int for current advance
Graphite can return negative advances, but we were storing current x and y advances as unsigned ints. The `curradvx` and `curradvy` variables are used only when calculating the respective offset, but the advance itself it always taken from Graphite directly, so using signed here makes no difference to how advances are set, only the offsets. Fixes #5439
1 parent 3b4336b commit 880eb46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hb-graphite2.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan HB_UNUSED,
266266
gr_segment *seg = nullptr;
267267
const gr_slot *is;
268268
unsigned int ci = 0, ic = 0;
269-
unsigned int curradvx = 0, curradvy = 0;
269+
int curradvx = 0, curradvy = 0;
270270

271271
unsigned int scratch_size;
272272
hb_buffer_t::scratch_buffer_t *scratch = buffer->get_scratch_buffer (&scratch_size);

0 commit comments

Comments
 (0)