aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ell_set.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ell_set.cpp b/src/ell_set.cpp
index 899ec1bf..434ae76d 100644
--- a/src/ell_set.cpp
+++ b/src/ell_set.cpp
@@ -318,7 +318,8 @@ static int ellps_shape (PJ *P) {
}
- if (P->es < 0)
+ // Written that way to catch NaN
+ if (!(P->es >= 0))
return proj_errno_set (P, PJD_ERR_ES_LESS_THAN_ZERO);
return 0;
}