[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
This commit is contained in:
Khaled Hosny 2019-11-17 16:17:20 +02:00
parent 78d5eca813
commit 9f1524ce83
1 changed files with 1 additions and 1 deletions

View File

@ -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 ();