Fix migration of rows and columns percents from registry (#1641)

This commit is contained in:
vldmr11080 2020-03-20 13:48:24 +01:00 committed by GitHub
parent dee6dc1e6c
commit 49868d8f7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -714,14 +714,14 @@ namespace JSONHelpers
int j = 5;
GridLayoutInfo zoneSetInfo(GridLayoutInfo::Minimal{ .rows = data[j++], .columns = data[j++] });
for (int row = 0; row < zoneSetInfo.rows(); row++)
for (int row = 0; row < zoneSetInfo.rows(); row++, j+=2)
{
zoneSetInfo.rowsPercents()[row] = data[j++] * 256 + data[j++];
zoneSetInfo.rowsPercents()[row] = data[j] * 256 + data[j+1];
}
for (int col = 0; col < zoneSetInfo.columns(); col++)
for (int col = 0; col < zoneSetInfo.columns(); col++, j+=2)
{
zoneSetInfo.columnsPercents()[col] = data[j++] * 256 + data[j++];
zoneSetInfo.columnsPercents()[col] = data[j] * 256 + data[j+1];
}
for (int row = 0; row < zoneSetInfo.rows(); row++)