From 172356be190bbf8233d6ee722b0d4621172190a9 Mon Sep 17 00:00:00 2001 From: cxj Date: Thu, 2 Jul 2015 13:51:03 +0800 Subject: [PATCH] fix lua-seric.c wb_table --- lualib-src/lua-seri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lualib-src/lua-seri.c b/lualib-src/lua-seri.c index 6e118230..1d12e263 100644 --- a/lualib-src/lua-seri.c +++ b/lualib-src/lua-seri.c @@ -260,7 +260,7 @@ wb_table(lua_State *L, struct write_block *wb, int index, int depth) { if (index < 0) { index = lua_gettop(L) + index + 1; } - if (luaL_getmetafield(L, index, "__pairs")) { + if (luaL_getmetafield(L, index, "__pairs") != LUA_TNIL) { uint8_t n = COMBINE_TYPE(TYPE_TABLE, 0); wb_push(wb, &n, 1); lua_pushvalue(L, index);