fix crash with gfx.drawText()

This commit is contained in:
jacob1 2014-01-20 11:33:18 -05:00
parent 0409d93789
commit add45b4e60

View File

@ -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);