mirror of
https://github.com/minetest/minetest.git
synced 2024-09-27 15:00:30 +02:00
Merge pull request #447 from sapier/add_lua_log_parameter_check
BUGFIX: check parameters for minetest.log lua function
This commit is contained in:
commit
bcc0ca93d4
|
@ -4428,8 +4428,8 @@ static int l_log(lua_State *L)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string levelname = lua_tostring(L, 1);
|
std::string levelname = luaL_checkstring(L, 1);
|
||||||
text = lua_tostring(L, 2);
|
text = luaL_checkstring(L, 2);
|
||||||
if(levelname == "error")
|
if(levelname == "error")
|
||||||
level = LMT_ERROR;
|
level = LMT_ERROR;
|
||||||
else if(levelname == "action")
|
else if(levelname == "action")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user