Commit 07125b8d authored by dejun.xdj's avatar dejun.xdj
Browse files

Bugfix: xadd comand <field,value> arity check

missing parenthesis causes wrong arithmetic priority.
parent 8ac7af1c
......@@ -1009,7 +1009,7 @@ void xaddCommand(client *c) {
int field_pos = i+1;
/* 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");
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