From 31a8202dd7c1adffd9a4638afc1767d9f0d83dd8 Mon Sep 17 00:00:00 2001
From: Michael Sippel <micha@fragmental.art>
Date: Mon, 29 Nov 2021 09:12:22 +0100
Subject: [PATCH] IndexArea.range(): set end to 0 instead of max

avoids capacity overflow
---
 nested/src/grid/mod.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nested/src/grid/mod.rs b/nested/src/grid/mod.rs
index 478d2ee..ec49777 100644
--- a/nested/src/grid/mod.rs
+++ b/nested/src/grid/mod.rs
@@ -29,7 +29,7 @@ impl IndexArea<Point2<i16>> {
 
     pub fn range(&self) -> RangeInclusive<Point2<i16>> {
         match self {
-            IndexArea::Empty => Point2::new(i16::MAX, i16::MAX)..=Point2::new(i16::MIN, i16::MIN),
+            IndexArea::Empty => Point2::new(1, 1)..=Point2::new(0, 0),
             IndexArea::Full => panic!("range from full grid area"),
             IndexArea::Set(v) => {
                 Point2::new(