Merge pull request #5049 from youjiali1995/fix-load-rdb

Fix rdbLoadIntegerObject() to create shared objects when needed.
This commit is contained in:
Salvatore Sanfilippo 2018-06-22 15:47:45 +02:00 committed by GitHub
commit 70b7fa2c52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -288,7 +288,7 @@ void *rdbLoadIntegerObject(rio *rdb, int enctype, int flags, size_t *lenptr) {
memcpy(p,buf,len);
return p;
} else if (encode) {
return createStringObjectFromLongLong(val);
return createStringObjectFromLongLongForValue(val);
} else {
return createObject(OBJ_STRING,sdsfromlonglong(val));
}