encode integers while loading an hash

This commit is contained in:
antirez 2010-06-07 18:07:46 +02:00
parent 65cc766581
commit b785b2bf66

View File

@ -4240,8 +4240,8 @@ static robj *rdbLoadObject(int type, FILE *fp) {
while(hashlen--) { while(hashlen--) {
robj *key, *val; robj *key, *val;
if ((key = rdbLoadStringObject(fp)) == NULL) return NULL; if ((key = rdbLoadEncodedStringObject(fp)) == NULL) return NULL;
if ((val = rdbLoadStringObject(fp)) == NULL) return NULL; if ((val = rdbLoadEncodedStringObject(fp)) == NULL) return NULL;
/* If we are using a zipmap and there are too big values /* If we are using a zipmap and there are too big values
* the object is converted to real hash table encoding. */ * the object is converted to real hash table encoding. */
if (o->encoding != REDIS_ENCODING_HT && if (o->encoding != REDIS_ENCODING_HT &&