Missed some changes from previous fix

This commit is contained in:
Simon Robertshaw 2011-10-01 20:18:07 +01:00
parent 5ded009ffd
commit 3e88325632

View File

@ -722,9 +722,9 @@ int luatpt_fillrect(lua_State* l)
if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE)
return luaL_error(l, "Screen coordinates out of range (%d,%d)", x, y); 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; w = XRES-x;
if(y+h > YRES) if(y+h > YRES+MENUSIZE)
h = YRES-y; h = YRES-y;
if (r<0) r = 0; if (r<0) r = 0;
if (r>255) r = 255; if (r>255) r = 255;