1
0
mirror of https://github.com/wg/wrk synced 2025-01-08 23:32:54 +08:00

fix bug in lua table copying

This commit is contained in:
Will 2015-11-04 21:59:11 +09:00
parent 8bf0b2e3d3
commit 03dc368674

View File

@ -492,8 +492,8 @@ void script_copy_value(lua_State *src, lua_State *dst, int index) {
lua_newtable(dst); lua_newtable(dst);
lua_pushnil(src); lua_pushnil(src);
while (lua_next(src, index - 1)) { while (lua_next(src, index - 1)) {
script_copy_value(src, dst, -1);
script_copy_value(src, dst, -2); script_copy_value(src, dst, -2);
script_copy_value(src, dst, -1);
lua_settable(dst, -3); lua_settable(dst, -3);
lua_pop(src, 1); lua_pop(src, 1);
} }