]> git.saurik.com Git - redis.git/commitdiff
encode integers while loading an hash
authorantirez <antirez@gmail.com>
Mon, 7 Jun 2010 16:07:46 +0000 (18:07 +0200)
committerantirez <antirez@gmail.com>
Mon, 7 Jun 2010 16:07:46 +0000 (18:07 +0200)
redis.c

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