diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index 333555902..348b8351c 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -2359,7 +2359,7 @@ int LuaScriptInterface::graphics_drawText(lua_State * l) { int x = lua_tointeger(l, 1); int y = lua_tointeger(l, 2); - char * text = (char*)lua_tostring(l, 3); + char * text = (char*)luaL_optstring(l, 3, ""); int r = luaL_optint(l, 4, 255); int g = luaL_optint(l, 5, 255); int b = luaL_optint(l, 6, 255);