fix type in rdbSaveKeyValuePair() when saving an intset. Don't merge this commit into 2.2 as will not apply cleanly.

This commit is contained in:
antirez 2011-02-28 17:55:05 +01:00
parent 26117e84f0
commit 1213abe477

View File

@ -384,6 +384,8 @@ int rdbSaveKeyValuePair(FILE *fp, robj *key, robj *val,
vtype = REDIS_HASH_ZIPMAP;
else if (vtype == REDIS_LIST && val->encoding == REDIS_ENCODING_ZIPLIST)
vtype = REDIS_LIST_ZIPLIST;
else if (vtype == REDIS_SET && val->encoding == REDIS_ENCODING_INTSET)
vtype = REDIS_SET_INTSET;
/* Save type, key, value */
if (rdbSaveType(fp,vtype) == -1) return -1;
if (rdbSaveStringObject(fp,key) == -1) return -1;