Fixed missing c->bufpos reset in luaRedisGenericCommand().

Bug introduced when adding a fast path to avoid copying the reply buffer
for small replies that fit into the client static buffer.
This commit is contained in:
antirez 2014-05-06 10:34:22 +02:00
parent c49955fd77
commit 3318b74705

View File

@ -312,6 +312,7 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
* the client buffer directly. */
c->buf[c->bufpos] = '\0';
reply = c->buf;
c->bufpos = 0;
} else {
reply = sdsnewlen(c->buf,c->bufpos);
c->bufpos = 0;