mail[Wesnoth-commits] r44305 - /branches/1.8/src/scripting/lua.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by guillaume . melquiond on July 18, 2010 - 18:16:
Author: silene
Date: Sun Jul 18 18:16:41 2010
New Revision: 44305

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44305&view=rev
Log:
Used relative addressing to ensure that the metatable is not put on the wrong 
object.

Modified:
    branches/1.8/src/scripting/lua.cpp

Modified: branches/1.8/src/scripting/lua.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.8/src/scripting/lua.cpp?rev=44305&r1=44304&r2=44305&view=diff
==============================================================================
--- branches/1.8/src/scripting/lua.cpp (original)
+++ branches/1.8/src/scripting/lua.cpp Sun Jul 18 18:16:41 2010
@@ -1371,7 +1371,7 @@
        // Get the metatable from the registry and set it.
        lua_pushlightuserdata(L, (void *)&getsideKey);
        lua_rawget(L, LUA_REGISTRYINDEX);
-       lua_setmetatable(L, 2);
+       lua_setmetatable(L, -2);
 
        return 1;
 }




Related Messages


Powered by MHonArc, Updated Sun Jul 18 18:40:12 2010