mirror of
https://github.com/fluencelabs/redis
synced 2025-06-12 00:31:21 +00:00
Fixed sds.c bug #124
This commit is contained in:
2
sds.c
2
sds.c
@ -140,7 +140,7 @@ sds sdscpylen(sds s, char *t, size_t len) {
|
||||
size_t totlen = sh->free+sh->len;
|
||||
|
||||
if (totlen < len) {
|
||||
s = sdsMakeRoomFor(s,len-totlen);
|
||||
s = sdsMakeRoomFor(s,len-sh->len);
|
||||
if (s == NULL) return NULL;
|
||||
sh = (void*) (s-(sizeof(struct sdshdr)));
|
||||
totlen = sh->free+sh->len;
|
||||
|
Reference in New Issue
Block a user