aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkwolekr <mirrorisim@gmail.com>2013-01-26 10:58:53 -0800
committerkwolekr <mirrorisim@gmail.com>2013-01-26 10:58:53 -0800
commitbcc0ca93d463ec7bdf6ff1ef621f7777014c404a (patch)
tree6d7d112777e4df68bb813fb4606aae97e5fd5ac0 /src
parent13358c29b8a754709c49b0ba997f029af26134bc (diff)
parenteb2a8fe8b8cd043fd9cca76173a2ede802b270b2 (diff)
downloadminetest-bcc0ca93d463ec7bdf6ff1ef621f7777014c404a.tar.gz
minetest-bcc0ca93d463ec7bdf6ff1ef621f7777014c404a.tar.bz2
minetest-bcc0ca93d463ec7bdf6ff1ef621f7777014c404a.zip
Merge pull request #447 from sapier/add_lua_log_parameter_check
BUGFIX: check parameters for minetest.log lua function
Diffstat (limited to 'src')
-rw-r--r--src/scriptapi.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp
index 13ba72056..6e2a0a314 100644
--- a/src/scriptapi.cpp
+++ b/src/scriptapi.cpp
@@ -4428,8 +4428,8 @@ static int l_log(lua_State *L)
}
else
{
- std::string levelname = lua_tostring(L, 1);
- text = lua_tostring(L, 2);
+ std::string levelname = luaL_checkstring(L, 1);
+ text = luaL_checkstring(L, 2);
if(levelname == "error")
level = LMT_ERROR;
else if(levelname == "action")