aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKurt Schwehr <schwehr@gmail.com>2018-03-27 08:42:43 -0700
committerKristian Evers <kristianevers@gmail.com>2018-03-27 17:42:43 +0200
commit28800e5af914d0f0ed0a414ad73a82029f0541b8 (patch)
tree71b12b51a3ec150172b3396409cb67792d8225c1 /src
parentee66d2a1b78669595699a16db097fc7c730e832a (diff)
downloadPROJ-28800e5af914d0f0ed0a414ad73a82029f0541b8.tar.gz
PROJ-28800e5af914d0f0ed0a414ad73a82029f0541b8.zip
Check for sweep_axis being an empty string in PJ_geos. (#908)
Check for sweep_axis being an empty string in PJ_geos
Diffstat (limited to 'src')
-rw-r--r--src/PJ_geos.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/PJ_geos.c b/src/PJ_geos.c
index d830c32c..f0a9bc24 100644
--- a/src/PJ_geos.c
+++ b/src/PJ_geos.c
@@ -206,7 +206,8 @@ PJ *PROJECTION(geos) {
if (sweep_axis == NULL)
Q->flip_axis = 0;
else {
- if (sweep_axis[1] != '\0' || (sweep_axis[0] != 'x' && sweep_axis[0] != 'y'))
+ if ((sweep_axis[0] != 'x' && sweep_axis[0] != 'y') ||
+ sweep_axis[1] != '\0')
return pj_default_destructor (P, PJD_ERR_INVALID_SWEEP_AXIS);
if (sweep_axis[0] == 'x')