diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-01-19 18:10:27 +0100 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-01-19 18:10:27 +0100 |
commit | 3e8cbd53cf2190d33ef8b8e005e5dcc60b6748de (patch) | |
tree | 88c1c562d66804c792b29e7f39ecf04a6a6aa816 | |
parent | f6a501001c18867d08b2ce222d177b8cf6c62a3a (diff) |
Let sds.c figure out where the range stops
-rw-r--r-- | hiredis.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -541,7 +541,7 @@ int redisReplyReaderGetReply(void *reader, void **reply) { /* Discard part of the buffer when we've consumed at least 1k, to avoid * doing unnecessary calls to memmove() in sds.c. */ if (r->pos >= 1024) { - r->buf = sdsrange(r->buf,r->pos,r->len); + r->buf = sdsrange(r->buf,r->pos,-1); r->pos = 0; r->len = sdslen(r->buf); } |