diff options
Diffstat (limited to 'src/t_string.c')
-rw-r--r-- | src/t_string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/t_string.c b/src/t_string.c index 2bf772a2d..f06693815 100644 --- a/src/t_string.c +++ b/src/t_string.c @@ -259,7 +259,7 @@ void getrangeCommand(redisClient *c) { /* Precondition: end >= 0 && end < strlen, so the only condition where * nothing can be returned is: start > end. */ - if (start > end) { + if (start > end || strlen == 0) { addReply(c,shared.emptybulk); } else { addReplyBulkCBuffer(c,(char*)str+start,end-start+1); |