summaryrefslogtreecommitdiff
path: root/hiredis.c
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-11-26 15:25:19 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-11-26 15:25:19 +0100
commite73289a5c618a12ee0fd05fb9d5a2b2404c29cd8 (patch)
tree9ab35319499f907bb0cffc995fc3e0dca584be98 /hiredis.c
parente24023a46a1ee9125b06a85af45b798362ea59a6 (diff)
Use r->len in another spot
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 5f56bf7..3ee0d0b 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -157,7 +157,7 @@ static void *createNilObject(const redisReadTask *task) {
static char *readBytes(redisReader *r, unsigned int bytes) {
char *p;
- if (sdslen(r->buf)-r->pos >= bytes) {
+ if (r->len-r->pos >= bytes) {
p = r->buf+r->pos;
r->pos += bytes;
return p;