From 00ea419596ed13668c76290acaefe29700923203 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sun, 9 Sep 2018 16:46:39 +0000 Subject: [PATCH] fpspreadsheet: Fix uninitialized hidden row state when reading xls. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6638 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/source/common/xlscommon.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/fpspreadsheet/source/common/xlscommon.pas b/components/fpspreadsheet/source/common/xlscommon.pas index 5b5b7f144..e2ef29be3 100644 --- a/components/fpspreadsheet/source/common/xlscommon.pas +++ b/components/fpspreadsheet/source/common/xlscommon.pas @@ -2504,6 +2504,7 @@ var xf: Word; begin rowrec.RowIndex := 0; // to silence the compiler... + AStream.ReadBuffer(rowrec, SizeOf(TRowRecord)); rowrec.RowIndex := WordLEToN(rowrec.RowIndex); flags := DWordLEToN(rowrec.Flags); @@ -2533,8 +2534,7 @@ begin lRow.FormatIndex := XFToFormatIndex(xf); { Row visibility } - if DWordLEToN(rowRec.Flags) and $00000020 <> 0 then - lRow.Hidden := true; + lRow.Hidden := rowRec.Flags and $00000020 <> 0; // We only create a row record for fpspreadsheet if the row has a // non-standard height (i.e. different from default row height) or format.