From: sapier Date: Sat, 26 Jan 2013 10:32:08 +0000 (+0000) Subject: check parameters for minetest.log lua function X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=eb2a8fe8b8cd043fd9cca76173a2ede802b270b2;p=zefram%2Fminetest%2Fminetest_engine.git check parameters for minetest.log lua function --- diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index 8e4a4326..35e708a0 100644 --- a/src/scriptapi.cpp +++ b/src/scriptapi.cpp @@ -4415,8 +4415,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")