From 492cea7bf12ed8020fa97e86d9f364c8eaaf511b Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sat, 2 Nov 2024 22:10:33 +0000 Subject: [PATCH] Correct charstring stack accounting in emit_contour() The first point doesn't count because it gets an rmoveto rather than an rlineto. --- bedstead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bedstead.c b/bedstead.c index 605e2e2..afdc75f 100644 --- a/bedstead.c +++ b/bedstead.c @@ -3571,7 +3571,7 @@ static void emit_contour(point *p0, vec *cur) { point *p = p0, *p1; - int stacksize = 0; + int stacksize = -2; /* Allow for initial rmoveto. */ if (p->prev) p->prev->next = NULL; /* Break the loop. */ do { -- 2.30.2