From 8a22da0acb4eaedd35004253aaa16fa19315df22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Sto=C5=A1i=C4=87?= Date: Thu, 5 Mar 2020 14:59:47 +0100 Subject: [PATCH] Fix too many zones crashing (#1337) Fix for an issue where creating too many zones causes a crash --- src/modules/fancyzones/lib/ZoneSet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/fancyzones/lib/ZoneSet.cpp b/src/modules/fancyzones/lib/ZoneSet.cpp index 9faf0bdfc..3977831f2 100644 --- a/src/modules/fancyzones/lib/ZoneSet.cpp +++ b/src/modules/fancyzones/lib/ZoneSet.cpp @@ -551,8 +551,8 @@ bool ZoneSet::CalculateGridZones(Rect workArea, JSONHelpers::GridLayoutInfo grid long Start; long End; }; - Info rowInfo[JSONHelpers::MAX_ZONE_COUNT]; - Info columnInfo[JSONHelpers::MAX_ZONE_COUNT]; + std::vector rowInfo(gridLayoutInfo.rows()); + std::vector columnInfo(gridLayoutInfo.columns()); long top = spacing; for (int row = 0; row < gridLayoutInfo.rows(); row++)