IndexArea.range(): set end to 0 instead of max
avoids capacity overflow
This commit is contained in:
parent
411b773ab5
commit
31a8202dd7
1 changed files with 1 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue