summaryrefslogtreecommitdiff
path: root/hiredis.c
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2011-01-27 14:39:34 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2011-01-27 14:39:34 +0100
commit663d6d1258b3ef49178ed4120de5c91ecffe2512 (patch)
treec4a728c661a72a053ea9bc73271b01765f8a6720 /hiredis.c
parent864bce944be1331c70ed353aeb083607c2a31acc (diff)
Properly reset state after protocol error in reply reader
Diffstat (limited to 'hiredis.c')
-rw-r--r--hiredis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hiredis.c b/hiredis.c
index 1017566..cd4ea50 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -493,7 +493,7 @@ static void redisSetReplyReaderError(redisReader *r, sds err) {
if (r->buf != NULL) {
sdsfree(r->buf);
r->buf = sdsempty();
- r->pos = 0;
+ r->pos = r->len = 0;
}
r->ridx = -1;
r->error = err;