From 96132ee1c135b18a5a860ab3e1e3cd15fc90545b Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 3 Aug 2012 00:52:24 +0100 Subject: [PATCH] Stop returning luaL_error from drawing functions for no reason, addresses issue #29 --- src/cat/LuaScriptInterface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index 7b98fa3ce..edd111f1f 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -1518,7 +1518,7 @@ int luatpt_drawrect(lua_State* l) if (a<0) a = 0; if (a>255) a = 255; luacon_g->drawrect(x, y, w, h, r, g, b, a); - return luaL_error(l, "Screen buffer does not exist"); + return 0; } int luatpt_fillrect(lua_State* l) @@ -1548,7 +1548,7 @@ int luatpt_fillrect(lua_State* l) if (a<0) a = 0; if (a>255) a = 255; luacon_g->fillrect(x, y, w, h, r, g, b, a); - return luaL_error(l, "Screen buffer does not exist"); + return 0; } int luatpt_drawline(lua_State* l) @@ -1573,7 +1573,7 @@ int luatpt_drawline(lua_State* l) if (a<0) a = 0; if (a>255) a = 255; luacon_g->draw_line(x1, y1, x2, y2, r, g, b, a); - return luaL_error(l, "Screen buffer does not exist"); + return 0; } int luatpt_textwidth(lua_State* l)