summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luaconsole.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luaconsole.c b/src/luaconsole.c
index 9a7613e..ad33041 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;