Unverified Commit 8a200b04 authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

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

Bugfix: xadd comand <field,value> arity check
parents de4b6cb2 07125b8d
...@@ -1073,7 +1073,7 @@ void xaddCommand(client *c) { ...@@ -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;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment