Use r->len in another spot

This commit is contained in:
Pieter Noordhuis 2010-11-26 15:25:19 +01:00
parent e24023a46a
commit e73289a5c6

View File

@ -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;