mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-29 02:40:47 +02:00
fix crash with gfx.drawText()
This commit is contained in:
@@ -2359,7 +2359,7 @@ int LuaScriptInterface::graphics_drawText(lua_State * l)
|
|||||||
{
|
{
|
||||||
int x = lua_tointeger(l, 1);
|
int x = lua_tointeger(l, 1);
|
||||||
int y = lua_tointeger(l, 2);
|
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 r = luaL_optint(l, 4, 255);
|
||||||
int g = luaL_optint(l, 5, 255);
|
int g = luaL_optint(l, 5, 255);
|
||||||
int b = luaL_optint(l, 6, 255);
|
int b = luaL_optint(l, 6, 255);
|
||||||
|
Reference in New Issue
Block a user