From d2d46fb40665ac4a7e838beeade38f1f207f7259 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 14 Oct 2006 22:19:13 +0000 Subject: [PATCH] simplify --- stepmania/src/LuaReference.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stepmania/src/LuaReference.cpp b/stepmania/src/LuaReference.cpp index 184960e158..a85432f1a9 100644 --- a/stepmania/src/LuaReference.cpp +++ b/stepmania/src/LuaReference.cpp @@ -193,9 +193,8 @@ void LuaTable::Set( Lua *L, const RString &sKey ) { int iTop = lua_gettop( L ); this->PushSelf( L ); - lua_pushstring( L, sKey ); // push the key lua_pushvalue( L, iTop ); // push the value - lua_settable( L, iTop+1 ); + lua_setfield( L, -2, sKey ); lua_settop( L, iTop-1 ); // remove all of the above }