Verify pairs are provided after subcommands
Fixes https://github.com/antirez/redis/issues/3639
This commit is contained in:
parent
497fb6a0fd
commit
d22d2b7b7f
@ -1521,7 +1521,7 @@ void zaddGenericCommand(client *c, int flags) {
|
||||
/* After the options, we expect to have an even number of args, since
|
||||
* we expect any number of score-element pairs. */
|
||||
elements = c->argc-scoreidx;
|
||||
if (elements % 2) {
|
||||
if (elements % 2 || !elements) {
|
||||
addReply(c,shared.syntaxerr);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user