diff options
author | antirez <antirez@gmail.com> | 2014-12-10 09:51:00 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-12-10 09:51:00 +0100 |
commit | 0b7f5e258afbddf2c4f38740290732901fec68d7 (patch) | |
tree | 3fe242b8a606a168ace4fcc31e63382caa510f43 /src/sds.c | |
parent | 0195afae39b590cfe30778f6685731f9bb663775 (diff) | |
parent | 6a378dc31209bb04f00c56eb4e4e7474017695b0 (diff) | |
download | redis-0b7f5e258afbddf2c4f38740290732901fec68d7.tar.gz |
Merge branch 'unstable' of github.com:/antirez/redis into unstable
Diffstat (limited to 'src/sds.c')
-rw-r--r-- | src/sds.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -570,7 +570,7 @@ sds sdstrim(sds s, const char *cset) { sp = start = s; ep = end = s+sdslen(s)-1; while(sp <= end && strchr(cset, *sp)) sp++; - while(ep > start && strchr(cset, *ep)) ep--; + while(ep > sp && strchr(cset, *ep)) ep--; len = (sp > ep) ? 0 : ((ep-sp)+1); if (sh->buf != sp) memmove(sh->buf, sp, len); sh->buf[len] = '\0'; |