From 03dc368674402f4b26a862f941f29887d06fd564 Mon Sep 17 00:00:00 2001 From: Will Date: Wed, 4 Nov 2015 21:59:11 +0900 Subject: [PATCH] fix bug in lua table copying --- src/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script.c b/src/script.c index 8c90564..08ff7eb 100644 --- a/src/script.c +++ b/src/script.c @@ -492,8 +492,8 @@ void script_copy_value(lua_State *src, lua_State *dst, int index) { lua_newtable(dst); lua_pushnil(src); while (lua_next(src, index - 1)) { - script_copy_value(src, dst, -1); script_copy_value(src, dst, -2); + script_copy_value(src, dst, -1); lua_settable(dst, -3); lua_pop(src, 1); }