Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
d23d73c7
Commit
d23d73c7
authored
May 06, 2012
by
Salvatore Sanfilippo
Browse files
Merge pull request #500 from pietern/2.6-zipfix
Compare integers in ziplist regardless of encoding
parents
7f10703b
0ef88927
Changes
1
Show whitespace changes
Inline
Side-by-side
src/ziplist.c
View file @
d23d73c7
...
...
@@ -773,14 +773,13 @@ 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
;
}
}
}
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment