summaryrefslogtreecommitdiff
path: root/src/geo.c
diff options
context:
space:
mode:
authorrojingeorge <itsmerojin@gmail.com>2016-06-23 21:34:03 +0530
committerrojingeorge <itsmerojin@gmail.com>2016-06-23 21:34:03 +0530
commit4aab50ac7b7565a9d87f5810b07efe1b69e27b1a (patch)
tree5e54eafad9769fdc6bdbb6a08ff9c921d65ca835 /src/geo.c
parent646c958bbd506839f02dbe8801275e11e2657955 (diff)
parentf60aa4de302992ac458f2f39d0e4918d4734723d (diff)
downloadredis-4aab50ac7b7565a9d87f5810b07efe1b69e27b1a.tar.gz
Merge remote-tracking branch 'refs/remotes/antirez/unstable' into unstable
Diffstat (limited to 'src/geo.c')
-rw-r--r--src/geo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/geo.c b/src/geo.c
index 2d351d8e0..28cb433dc 100644
--- a/src/geo.c
+++ b/src/geo.c
@@ -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;
}