From 10a6da7af4bebad2b47a59d79609419aa98fae51 Mon Sep 17 00:00:00 2001 From: antirez Date: Sun, 1 May 2011 15:48:26 +0200 Subject: [PATCH] Multi bulk to Lua table now working --- src/scripting.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/scripting.c b/src/scripting.c index 9269cbf1..9b1fb12d 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -98,17 +98,15 @@ char *redisProtocolToLuaType_MultiBulk(lua_State *lua, char *reply) { long long mbulklen; int j = 0; - printf("--%s-- (%d)\n", reply,(int)(p-reply-1)); string2ll(reply+1,p-reply-1,&mbulklen); p += 2; if (mbulklen == -1) { lua_pushnil(lua); return p; } - printf("BL: %lld\n", mbulklen); lua_newtable(lua); for (j = 0; j < mbulklen; j++) { - lua_pushnumber(lua,j); + lua_pushnumber(lua,j+1); p = redisProtocolToLuaType(lua,p); lua_settable(lua,-3); } -- 2.45.2