]> git.saurik.com Git - redis.git/commitdiff
Fixed a problem in the script engine that crashed the server if the reply was not...
authorantirez <antirez@gmail.com>
Mon, 2 May 2011 21:04:08 +0000 (23:04 +0200)
committerantirez <antirez@gmail.com>
Wed, 25 May 2011 10:32:47 +0000 (12:32 +0200)
src/scripting.c

index 7bc78425552160afd90ce3aeab92a052e7f3c97a..65cbed62dbd259c34596d2ee0ec17de86dbe64d1 100644 (file)
@@ -184,7 +184,7 @@ int luaRedisCommand(lua_State *lua) {
     while(listLength(c->reply)) {
         robj *o = listNodeValue(listFirst(c->reply));
 
-        sdscatlen(reply,o->ptr,sdslen(o->ptr));
+        reply = sdscatlen(reply,o->ptr,sdslen(o->ptr));
         listDelNode(c->reply,listFirst(c->reply));
     }
     redisProtocolToLuaType(lua,reply);