X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/a76b9063d0b858fd2c72a92794b4c852005cac30..e150ce3ce6375de2f11784935483e85cf3bbcf59:/src/ziplist.c diff --git a/src/ziplist.c b/src/ziplist.c index 420f1304..31e61633 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -346,7 +346,6 @@ static int64_t zipLoadInteger(unsigned char *p, unsigned char encoding) { int16_t i16; int32_t i32; int64_t i64, ret = 0; - printf("%02x\n", encoding); if (encoding == ZIP_INT_8B) { ret = ((char*)p)[0]; } else if (encoding == ZIP_INT_16B) { @@ -774,12 +773,11 @@ unsigned int ziplistCompare(unsigned char *p, unsigned char *sstr, unsigned int return 0; } } else { - /* Try to compare encoded values */ + /* Try to compare encoded values. Don't compare encoding because + * different implementations may encoded integers differently. */ if (zipTryEncoding(sstr,slen,&sval,&sencoding)) { - if (entry.encoding == sencoding) { - zval = zipLoadInteger(p+entry.headersize,entry.encoding); - return zval == sval; - } + zval = zipLoadInteger(p+entry.headersize,entry.encoding); + return zval == sval; } } return 0;