From 059ee3b1ec0a7620c47116da01d0d92c4718184a Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Sat, 17 Oct 2009 16:36:42 +0000 Subject: [PATCH] Forgot an occurrence of lua_getfield. --- src/scripting/lua.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 16bb27312c0..a2addbde997 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -567,7 +567,8 @@ static int impl_vconfig_collect(lua_State *L) static int impl_unit_type_get(lua_State *L) { char const *m = luaL_checkstring(L, 2); - lua_getfield(L, 1, "id"); + lua_pushstring(L, "id"); + lua_rawget(L, 1); unit_type_data::unit_type_map_wrapper &ut_map = unit_type_data::types(); unit_type_data::unit_type_map::const_iterator uti = ut_map.find_unit_type(lua_tostring(L, -1));