From 73540b5e09441eaacca7547349e88b3711cd16f2 Mon Sep 17 00:00:00 2001 From: rxi Date: Tue, 24 Jun 2014 23:04:33 +0100 Subject: [PATCH] Fixed off-by-one in l_graphics_circle()'s horiz clipping --- src/graphics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics.c b/src/graphics.c index 1d3b2f0..3f5c2d9 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -440,7 +440,7 @@ int l_graphics_circle(lua_State *L) { int sy = (starty);\ if (sy < 0 || sy >= graphics_canvas->height) break;\ if (sx < 0) sx = 0;\ - if (sx >= graphics_canvas->width) sx = graphics_canvas->width - 1;\ + if (sx > graphics_canvas->width) sx = graphics_canvas->width;\ if (ex < 0) ex = 0;\ if (ex > graphics_canvas->width) ex = graphics_canvas->width;\ if (sx == ex) break;\