Commit 3318b747 authored by antirez's avatar antirez
Browse files

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.
parent c49955fd
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment