From eef62c82a2e58700fc1216b0b8c03e421bc77995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Sat, 30 Jun 2018 17:11:38 +0200 Subject: Modernize lua read (part 2 & 3): C++ templating assurance (#7410) * Modernize lua read (part 2 & 3): C++ templating assurance Implement the boolean reader Implement the string reader Also remove unused & unimplemented script_error_handler Add a reader with default value --- src/script/lua_api/l_item.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/script/lua_api/l_item.cpp') diff --git a/src/script/lua_api/l_item.cpp b/src/script/lua_api/l_item.cpp index 46c1c98a0..e41d23fd1 100644 --- a/src/script/lua_api/l_item.cpp +++ b/src/script/lua_api/l_item.cpp @@ -508,7 +508,7 @@ int ModApiItemMod::l_register_item_raw(lua_State *L) std::string name; lua_getfield(L, table, "name"); if(lua_isstring(L, -1)){ - name = lua_tostring(L, -1); + name = readParam(L, -1); verbosestream<<"register_item_raw: "<