diff options
author | Salvatore Sanfilippo <antirez@gmail.com> | 2016-06-16 12:57:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-16 12:57:59 +0200 |
commit | 64b834b8b2b75460f7a0cd9cd60dc3bd09bc0f16 (patch) | |
tree | f489f0e95f9b6fb4cc7290fdc70e1d2b631aa554 | |
parent | 2f2fd64c0db00b82e6c336d0ee9e19d50a3aad5f (diff) | |
parent | f3e81de17688e310b7a5ef5108a3a6c8962eb133 (diff) | |
download | redis-64b834b8b2b75460f7a0cd9cd60dc3bd09bc0f16.tar.gz |
Merge pull request #3256 from oranagra/georasius_neg
fix georadius returns multiple replies
-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; } |