Skip to content

Commit

Permalink
fix bounds checking #49
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed May 7, 2018
1 parent 0d15124 commit 7f08007
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void checkInvalidParameter(boolean reverse, String query, String point) {
} catch (RuntimeException e) {
throw new BadRequestException("The coordinates of point need to be valid numbers");
}
if (Double.isNaN(lat) || Double.isNaN(lon) || lat < -180 || lat > 180 || lon < -90 || lon > 90) {
if (Double.isNaN(lat) || Double.isNaN(lon) || lon < -180 || lon > 180 || lat < -90 || lat > 90) {
throw new BadRequestException("The coordinates of point need to be valid coordinates");
}
} else {
Expand Down

0 comments on commit 7f08007

Please sign in to comment.