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:
parent
477ff4cd32
commit
c11d3ef4f2
@ -312,6 +312,7 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
|
|||||||
* the client buffer directly. */
|
* the client buffer directly. */
|
||||||
c->buf[c->bufpos] = '\0';
|
c->buf[c->bufpos] = '\0';
|
||||||
reply = c->buf;
|
reply = c->buf;
|
||||||
|
c->bufpos = 0;
|
||||||
} else {
|
} else {
|
||||||
reply = sdsnewlen(c->buf,c->bufpos);
|
reply = sdsnewlen(c->buf,c->bufpos);
|
||||||
c->bufpos = 0;
|
c->bufpos = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user