diff options
author | antirez <antirez@gmail.com> | 2014-05-06 10:34:22 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-05-06 10:34:22 +0200 |
commit | a5222d3641e7704206ad6194529b608045853f46 (patch) | |
tree | b920dbc4478d506ca73fc604c965d3585b451c53 | |
parent | 9e4bf7e9ee3eee79c7f07320bd59063e64fbdf90 (diff) | |
download | redis-a5222d3641e7704206ad6194529b608045853f46.tar.gz |
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.
-rw-r--r-- | src/scripting.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/scripting.c b/src/scripting.c index 479381efc..c0dcbeac6 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -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; |