Merge pull request #4831 from 0xtonyxia/fix-xadd-arity-check

Bugfix: xadd comand <field,value> arity check
This commit is contained in:
Salvatore Sanfilippo 2018-05-24 16:07:19 +02:00 committed by GitHub
commit f30ecc4de2

View File

@ -1073,7 +1073,7 @@ void xaddCommand(client *c) {
int field_pos = i+1; int field_pos = i+1;
/* Check arity. */ /* Check arity. */
if ((c->argc - field_pos) < 2 || (c->argc-field_pos % 2) == 1) { if ((c->argc - field_pos) < 2 || ((c->argc-field_pos) % 2) == 1) {
addReplyError(c,"wrong number of arguments for XADD"); addReplyError(c,"wrong number of arguments for XADD");
return; return;
} }