Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2ee7dd36
Commit
2ee7dd36
authored
May 05, 2011
by
antirez
Browse files
Merge branch '2.4' of github.com:antirez/redis into 2.4
parents
fddd64e6
d275513b
Changes
1
Show whitespace changes
Inline
Side-by-side
src/util.c
View file @
2ee7dd36
...
...
@@ -222,10 +222,13 @@ int string2ll(char *s, size_t slen, long long *value) {
return
0
;
}
/* First digit should be 1-9. */
/* First digit should be 1-9
, otherwise the string should just be 0
. */
if
(
p
[
0
]
>=
'1'
&&
p
[
0
]
<=
'9'
)
{
v
=
p
[
0
]
-
'0'
;
p
++
;
plen
++
;
}
else
if
(
p
[
0
]
==
'0'
&&
slen
==
1
)
{
*
value
=
0
;
return
1
;
}
else
{
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