mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Bugfix: xadd comand <field,value> arity check
missing parenthesis causes wrong arithmetic priority.
This commit is contained in:
parent
8ac7af1c5d
commit
07125b8d22
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user