aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/projections/isea.cpp4
-rw-r--r--test/gie/builtins.gie3
2 files changed, 7 insertions, 0 deletions
diff --git a/src/projections/isea.cpp b/src/projections/isea.cpp
index 28510cb0..e8720b27 100644
--- a/src/projections/isea.cpp
+++ b/src/projections/isea.cpp
@@ -898,6 +898,10 @@ static int isea_hex(struct isea_dgg *g, int tri,
quad = isea_ptdi(g, tri, pt, &v);
+ if( v.x < (INT_MIN >> 4) || v.x > (INT_MAX >> 4) )
+ {
+ throw "Invalid shift";
+ }
hex->x = ((int)v.x << 4) + quad;
hex->y = v.y;
diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie
index 631767a3..0f583454 100644
--- a/test/gie/builtins.gie
+++ b/test/gie/builtins.gie
@@ -2167,6 +2167,9 @@ expect -1575486.353641554 3442168.342028188
accept -2 -1
expect -1575486.353880283 3234352.695594706
+operation +proj=isea +mode=hex +resolution=31
+accept 0 0
+expect failure
===============================================================================
Kavraisky V