]> git.saurik.com Git - redis.git/commitdiff
fix for zipmap raw saving in unstable branch
authorantirez <antirez@gmail.com>
Mon, 28 Feb 2011 14:13:49 +0000 (15:13 +0100)
committerantirez <antirez@gmail.com>
Mon, 28 Feb 2011 14:13:49 +0000 (15:13 +0100)
src/rdb.c

index 06d72a991fa4abcdde2507c8306eb2d1207e76e2..1413548045a58ef8d66f6a9918fb752f2618a850 100644 (file)
--- a/src/rdb.c
+++ b/src/rdb.c
@@ -407,7 +407,7 @@ int rdbSaveKeyValuePair(FILE *fp, robj *key, robj *val,
     if (vtype == REDIS_HASH && val->encoding == REDIS_ENCODING_ZIPMAP)
         vtype = REDIS_HASH_ZIPMAP;
     /* Save type, key, value */
-    if (rdbSaveType(fp,val->type) == -1) return -1;
+    if (rdbSaveType(fp,vtype) == -1) return -1;
     if (rdbSaveStringObject(fp,key) == -1) return -1;
     if (rdbSaveObject(fp,val) == -1) return -1;
     return 1;