mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Merge pull request #3657 from itamarhaber/patch-9
Verify pairs are provided after ZADD's subcommands
This commit is contained in:
commit
41d16f7a4a
@ -1521,7 +1521,7 @@ void zaddGenericCommand(client *c, int flags) {
|
|||||||
/* After the options, we expect to have an even number of args, since
|
/* After the options, we expect to have an even number of args, since
|
||||||
* we expect any number of score-element pairs. */
|
* we expect any number of score-element pairs. */
|
||||||
elements = c->argc-scoreidx;
|
elements = c->argc-scoreidx;
|
||||||
if (elements % 2) {
|
if (elements % 2 || !elements) {
|
||||||
addReply(c,shared.syntaxerr);
|
addReply(c,shared.syntaxerr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user