From 646c1c1cc7ecc0cef7f619ae01457659817e5d05 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Sat, 28 Sep 2019 22:31:28 +0100 Subject: fix bug in toggle_trapezium --- draw.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/draw.c b/draw.c index 822113f..51a27b2 100644 --- a/draw.c +++ b/draw.c @@ -251,15 +251,17 @@ void draw_trapezium(int x1, int y1, char st, char fix){ for(i=xmin+1; i<=xmax; i++){ f(i, ylong, line_h); } - for(i=xmin+xoff; i<=xmax-xoff; i++){ - f(i, yshort, line_h); + if (st & 0x02){ /* Centred trapezium */ + for(i=xmin+xoff; i<=xmax-xoff; i++){ + f(i, yshort, line_h); + } } f(xmin+xoff, yshort, corner); f(xmin, ylong, corner); f(xmax-xoff, yshort, corner); f(xmax, ylong, corner); xoff --; - if ((st & BOX_TRAP_D) == BOX_TRAP_D) + if ((st & BOX_TRAP_DC) == BOX_TRAP_DC) xoff = 1; for(i=ymin+1; i