diff --git a/src/utils.cpp b/src/utils.cpp index f2829004d..1c2c02e8d 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -561,15 +561,15 @@ void convex_hull(const Array points, Array& result) { if (points.count < 4) { result.extend(points); return; - } else if (points.count > INT_MAX) { + } else if (points.count > qh_POINTSmax) { Array partial; - partial.count = INT_MAX - 1; + partial.count = qh_POINTSmax; partial.items = points.items; Array temp = {}; convex_hull(partial, temp); - partial.count = points.count - (INT_MAX - 1); - partial.items = points.items + (INT_MAX - 1); + partial.count = points.count - qh_POINTSmax; + partial.items = points.items + qh_POINTSmax; temp.extend(partial); convex_hull(temp, result); temp.clear();