diff --git a/src/cat/LuaCheckbox.cpp b/src/cat/LuaCheckbox.cpp index 844573eac..8256730b6 100644 --- a/src/cat/LuaCheckbox.cpp +++ b/src/cat/LuaCheckbox.cpp @@ -53,7 +53,6 @@ int LuaCheckbox::checked(lua_State * l) int args = lua_gettop(l); if(args) { - luaL_checktype(l, 1, LUA_TBOOLEAN); checkbox->SetChecked(lua_toboolean(l, 1)); return 0; } @@ -84,7 +83,6 @@ int LuaCheckbox::text(lua_State * l) int args = lua_gettop(l); if(args) { - luaL_checktype(l, 1, LUA_TSTRING); checkbox->SetText(lua_tostring(l, 1)); return 0; } diff --git a/src/cat/LuaLabel.cpp b/src/cat/LuaLabel.cpp index e2ca56db2..007e00973 100644 --- a/src/cat/LuaLabel.cpp +++ b/src/cat/LuaLabel.cpp @@ -40,8 +40,7 @@ int LuaLabel::text(lua_State * l) int args = lua_gettop(l); if(args) { - luaL_checktype(l, 1, LUA_TSTRING); - label->SetText(lua_tostring(l, 1)); + label->SetText(std::string(lua_tostring(l, 1))); return 0; } else diff --git a/src/cat/LuaTextbox.cpp b/src/cat/LuaTextbox.cpp index fa5753c95..46285c8d9 100644 --- a/src/cat/LuaTextbox.cpp +++ b/src/cat/LuaTextbox.cpp @@ -100,8 +100,7 @@ int LuaTextbox::text(lua_State * l) int args = lua_gettop(l); if(args) { - luaL_checktype(l, 1, LUA_TSTRING); - textbox->SetText(lua_tostring(l, 1)); + textbox->SetText(std::string(lua_tostring(l, 1))); return 0; } else