diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-11-26 15:25:19 +0100 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-11-26 15:25:19 +0100 |
commit | e73289a5c618a12ee0fd05fb9d5a2b2404c29cd8 (patch) | |
tree | 9ab35319499f907bb0cffc995fc3e0dca584be98 /hiredis.c | |
parent | e24023a46a1ee9125b06a85af45b798362ea59a6 (diff) |
Use r->len in another spot
Diffstat (limited to 'hiredis.c')
-rw-r--r-- | hiredis.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |