aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/projections/isea.cpp4
1 files changed, 4 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;