aboutsummaryrefslogtreecommitdiff
path: root/src/pj_ell_set.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pj_ell_set.c')
-rw-r--r--src/pj_ell_set.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pj_ell_set.c b/src/pj_ell_set.c
index 8ba928b7..18beb875 100644
--- a/src/pj_ell_set.c
+++ b/src/pj_ell_set.c
@@ -237,6 +237,8 @@ static int pj_shape (PJ *P) {
P->rf = pj_atof (pj_param_value (par));
if (HUGE_VAL==P->rf)
return proj_errno_set (P, PJD_ERR_INVALID_ARG);
+ if (0==P->rf)
+ return proj_errno_set (P, PJD_ERR_REV_FLATTENING_IS_ZERO);
P->f = 1 / P->rf;
P->es = 2*P->f - P->f*P->f;
break;
@@ -279,7 +281,7 @@ static int pj_shape (PJ *P) {
if (HUGE_VAL==P->b)
return proj_errno_set (P, PJD_ERR_INVALID_ARG);
if (0==P->b)
- return proj_errno_set (P, PJD_ERR_INVALID_ARG);
+ return proj_errno_set (P, PJD_ERR_ECCENTRICITY_IS_ONE);
P->f = (P->a - P->b) / P->a;
P->es = 2*P->f - P->f*P->f;
break;