mirror of
https://github.com/fluencelabs/redis
synced 2025-05-29 02:01:19 +00:00
Merge pull request #500 from pietern/2.6-zipfix
Compare integers in ziplist regardless of encoding
This commit is contained in:
commit
d23d73c746
@ -773,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user