Fix too many zones crashing (#1337)

Fix for an issue where creating too many zones causes a crash
This commit is contained in:
Ivan Stošić 2020-03-05 14:59:47 +01:00 committed by GitHub
parent cf1b53831f
commit 8a22da0acb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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<Info> rowInfo(gridLayoutInfo.rows());
std::vector<Info> columnInfo(gridLayoutInfo.columns());
long top = spacing;
for (int row = 0; row < gridLayoutInfo.rows(); row++)