From 3e88325632bd6437204ae7c90fdde04293fcd406 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 1 Oct 2011 20:18:07 +0100 Subject: [PATCH] Missed some changes from previous fix --- src/luaconsole.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/luaconsole.c b/src/luaconsole.c index 9a7613e24..ad33041f9 100644 --- a/src/luaconsole.c +++ b/src/luaconsole.c @@ -722,9 +722,9 @@ int luatpt_fillrect(lua_State* l) if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) return luaL_error(l, "Screen coordinates out of range (%d,%d)", x, y); - if(x+w > XRES) + if(x+w > XRES+BARSIZE) w = XRES-x; - if(y+h > YRES) + if(y+h > YRES+MENUSIZE) h = YRES-y; if (r<0) r = 0; if (r>255) r = 255;