diff options
author | kwolekr <mirrorisim@gmail.com> | 2013-01-26 10:58:53 -0800 |
---|---|---|
committer | kwolekr <mirrorisim@gmail.com> | 2013-01-26 10:58:53 -0800 |
commit | bcc0ca93d463ec7bdf6ff1ef621f7777014c404a (patch) | |
tree | 6d7d112777e4df68bb813fb4606aae97e5fd5ac0 | |
parent | 13358c29b8a754709c49b0ba997f029af26134bc (diff) | |
parent | eb2a8fe8b8cd043fd9cca76173a2ede802b270b2 (diff) | |
download | minetest-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
-rw-r--r-- | src/scriptapi.cpp | 4 |
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") |