Use r->len in another spot
This commit is contained in:
parent
e24023a46a
commit
e73289a5c6
@ -157,7 +157,7 @@ static void *createNilObject(const redisReadTask *task) {
|
|||||||
|
|
||||||
static char *readBytes(redisReader *r, unsigned int bytes) {
|
static char *readBytes(redisReader *r, unsigned int bytes) {
|
||||||
char *p;
|
char *p;
|
||||||
if (sdslen(r->buf)-r->pos >= bytes) {
|
if (r->len-r->pos >= bytes) {
|
||||||
p = r->buf+r->pos;
|
p = r->buf+r->pos;
|
||||||
r->pos += bytes;
|
r->pos += bytes;
|
||||||
return p;
|
return p;
|
||||||
|
Loading…
Reference in New Issue
Block a user