Fixed a problem in the script engine that crashed the server if the reply was not stored just int the static buffer of the client structure.

This commit is contained in:
antirez 2011-05-02 23:04:08 +02:00
parent 0d916763af
commit 09ab5591fa

View 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);