mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Geo: GEOENCODE: fix command arity check.
This commit is contained in:
parent
6a8e108e2d
commit
ddc7b85c5f
@ -600,11 +600,11 @@ void geoDecodeCommand(redisClient *c) {
|
||||
/* GEOENCODE long lat [radius unit] */
|
||||
void geoEncodeCommand(redisClient *c) {
|
||||
double radius_meters = 0;
|
||||
if (c->argc >= 5) {
|
||||
if (c->argc == 5) {
|
||||
if ((radius_meters = extractDistanceOrReply(c, c->argv + 3, NULL)) < 0)
|
||||
return;
|
||||
} else if (c->argc == 4) {
|
||||
addReplyError(c, "must provide units when asking for radius encode");
|
||||
} else if (c->argc == 4 || c->argc > 5) {
|
||||
addReplyError(c, "syntax error, try: GEOENCODE x y [radius unit]");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user