diff options
author | oranagra <oran@redislabs.com> | 2016-05-23 13:58:50 +0300 |
---|---|---|
committer | oranagra <oran@redislabs.com> | 2016-05-23 13:58:50 +0300 |
commit | f3e81de17688e310b7a5ef5108a3a6c8962eb133 (patch) | |
tree | c6f54c9e9faab72908a819e1a0a113de29be2b20 /src/geo.c | |
parent | b09a6b6a5d7c7c2de81325b3c1ab687536059009 (diff) | |
download | redis-f3e81de17688e310b7a5ef5108a3a6c8962eb133.tar.gz |
fix georadius returns multiple replies
Diffstat (limited to 'src/geo.c')
-rw-r--r-- | src/geo.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -156,9 +156,13 @@ double extractDistanceOrReply(client *c, robj **argv, return -1; } + if (distance < 0) { + addReplyError(c,"radius cannot be negative"); + return -1; + } + double to_meters = extractUnitOrReply(c,argv[1]); if (to_meters < 0) { - addReplyError(c,"radius cannot be negative"); return -1; } @@ -465,7 +469,6 @@ void georadiusGeneric(client *c, int type) { double radius_meters = 0, conversion = 1; if ((radius_meters = extractDistanceOrReply(c, c->argv + base_args - 2, &conversion)) < 0) { - addReplyError(c,"radius must be >= 0"); return; } |