From 49868d8f7cf692b7356b427c7846104d0a419b3e Mon Sep 17 00:00:00 2001 From: vldmr11080 <57061786+vldmr11080@users.noreply.github.com> Date: Fri, 20 Mar 2020 13:48:24 +0100 Subject: [PATCH] Fix migration of rows and columns percents from registry (#1641) --- src/modules/fancyzones/lib/JsonHelpers.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/fancyzones/lib/JsonHelpers.cpp b/src/modules/fancyzones/lib/JsonHelpers.cpp index b3a2cc5162..6aeb50c297 100644 --- a/src/modules/fancyzones/lib/JsonHelpers.cpp +++ b/src/modules/fancyzones/lib/JsonHelpers.cpp @@ -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++)