From eef62c82a2e58700fc1216b0b8c03e421bc77995 Mon Sep 17 00:00:00 2001 From: Loïc Blot 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_storage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/script/lua_api/l_storage.cpp') diff --git a/src/script/lua_api/l_storage.cpp b/src/script/lua_api/l_storage.cpp index caa1a5551..cba34fb63 100644 --- a/src/script/lua_api/l_storage.cpp +++ b/src/script/lua_api/l_storage.cpp @@ -30,7 +30,7 @@ int ModApiStorage::l_get_mod_storage(lua_State *L) return 0; } - std::string mod_name = lua_tostring(L, -1); + std::string mod_name = readParam(L, -1); ModMetadata *store = new ModMetadata(mod_name); if (IGameDef *gamedef = getGameDef(L)) { -- cgit v1.2.3