From 9f1524ce83ebd2c3320ffc90776cb0f533db143f Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sun, 17 Nov 2019 16:17:20 +0200 Subject: [PATCH] [cff] Fix a typo in processing rlinecurve We want to process all pairs of arguments except the last 6 as lines, so should have been subtracting 6 here, otherwise if the number of arguments happens to be multiples of 6 they will be all treated as curves. See https://github.com/harfbuzz/harfbuzz/pull/2016#issuecomment-554640098 --- src/hb-cff-interp-cs-common.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-cff-interp-cs-common.hh b/src/hb-cff-interp-cs-common.hh index d9ad4d0d6..fee4c0c27 100644 --- a/src/hb-cff-interp-cs-common.hh +++ b/src/hb-cff-interp-cs-common.hh @@ -573,7 +573,7 @@ struct path_procs_t static void rlinecurve (ENV &env, PARAM& param) { unsigned int i = 0; - unsigned int line_limit = (env.argStack.get_count () % 6); + unsigned int line_limit = (env.argStack.get_count () - 6); for (; i + 2 <= line_limit; i += 2) { point_t pt1 = env.get_pt ();