summaryrefslogtreecommitdiff
path: root/src/cat/LuaTextbox.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2013-02-16 14:52:29 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2013-02-16 14:52:29 (GMT)
commita091f55fec5c19ab6c31accb9b13510d74855169 (patch)
tree417f1fbf27e21d6406e413f660116b4e5a0e44b8 /src/cat/LuaTextbox.cpp
parent8d04b260a7966a31919e9b8dae8da852a47d9313 (diff)
downloadpowder-a091f55fec5c19ab6c31accb9b13510d74855169.zip
powder-a091f55fec5c19ab6c31accb9b13510d74855169.tar.gz
Allow implicit conversions when setting text property on some Lua API UI elements
Diffstat (limited to 'src/cat/LuaTextbox.cpp')
-rw-r--r--src/cat/LuaTextbox.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cat/LuaTextbox.cpp b/src/cat/LuaTextbox.cpp
index fa5753c..46285c8 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