diff options
author | sapier <Sapier at GMX dot net> | 2013-01-26 10:32:08 +0000 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2013-01-26 10:32:08 +0000 |
commit | eb2a8fe8b8cd043fd9cca76173a2ede802b270b2 (patch) | |
tree | e3b0a8a492cf03b982f1a134fe7e09727c2cbbcc /src | |
parent | c691d619c24cdca11655455c510920ab7937b319 (diff) | |
download | minetest-eb2a8fe8b8cd043fd9cca76173a2ede802b270b2.tar.gz minetest-eb2a8fe8b8cd043fd9cca76173a2ede802b270b2.tar.bz2 minetest-eb2a8fe8b8cd043fd9cca76173a2ede802b270b2.zip |
check parameters for minetest.log lua function
Diffstat (limited to 'src')
-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 8e4a43266..35e708a04 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") |