From f23453842839c82c7065879977bc33c166fdf69b Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sat, 16 Nov 2024 23:39:30 +0000 Subject: [PATCH] Switch hhints loop in emit_hints() so it counts forwards Now that it only touches the input array once, it's much simpler to do the y-axis inversion there. --- bedstead.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bedstead.c b/bedstead.c index 6af8523..20f048c 100644 --- a/bedstead.c +++ b/bedstead.c @@ -3849,10 +3849,10 @@ emit_hints(int vstems[XSIZE], int ledges[XSIZE], int redges[XSIZE], select_hints(YSIZE, hstems, tedges, bedges, hhints); cur = DESCENT * YPIX; printed = false; - for (i = YSIZE - 1; i >= 0; i--) { - switch (hhints[i]) { + for (i = 0; i < YSIZE; i++) { + switch (hhints[YSIZE - 1 - i]) { case hint_stem: - start = (YSIZE - i - 1) * YPIX_S; + start = i * YPIX_S; size = YPIX_S; break; default: continue; -- 2.30.2