From fd97e923f3f8409346723a9924761c9e21bb79d3 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Thu, 16 May 2013 19:36:41 -0400 Subject: [PATCH] remove check in deco tools (that shouldn't be there) --- src/cat/LuaScriptInterface.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index f9239f9c6..f25763678 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -1155,8 +1155,6 @@ int LuaScriptInterface::simulation_decoBrush(lua_State * l) int a = luaL_optint(l,8,255); int tool = luaL_optint(l,9,DECO_DRAW); int brush = luaL_optint(l,10,CIRCLE_BRUSH); - if (tool < 0 || tool >= luacon_sim->tools.size()) - return luaL_error(l, "Invalid tool id '%d'", tool); vector brushList = luacon_model->GetBrushList(); if (brush < 0 || brush >= brushList.size()) @@ -1183,8 +1181,6 @@ int LuaScriptInterface::simulation_decoLine(lua_State * l) int a = luaL_optint(l,10,255); int tool = luaL_optint(l,11,DECO_DRAW); int brush = luaL_optint(l,12,CIRCLE_BRUSH); - if (tool < 0 || tool >= luacon_sim->tools.size()) - return luaL_error(l, "Invalid tool id '%d'", tool); vector brushList = luacon_model->GetBrushList(); if (brush < 0 || brush >= brushList.size()) @@ -1210,8 +1206,6 @@ int LuaScriptInterface::simulation_decoBox(lua_State * l) int b = luaL_optint(l,9,255); int a = luaL_optint(l,10,255); int tool = luaL_optint(l,11,0); - if (tool < 0 || tool >= luacon_sim->tools.size()) - return luaL_error(l, "Invalid tool id '%d'", tool); luacon_sim->ApplyDecorationBox(x1, y1, x2, y2, r, g, b, a, tool); return 0;