xlsxdecrypter doesnot compilie with FPC 3.0.4
Original Reporter info from Mantis: Simon Ameis @SAmeis
-
Reporter name: Simon Ameis
Original Reporter info from Mantis: Simon Ameis @SAmeis
- Reporter name: Simon Ameis
Description:
Unit xlsxdecrypter.pas doesnot compile with FPC 3.0.4 because of the following errors:
xlsxdecrypter.pas(347,59) Error: Incompatible type for arg no. 3: Got "TBytes", expected "LongWord"
xlsxdecrypter.pas(165,11) Hint: Found declaration: ConcatToByteArray(var TBytes;TBytes;LongWord);
xlsxdecrypter.pas(151,11) Hint: Found declaration: ConcatToByteArray(var TBytes;LongWord;TBytes);
xlsxdecrypter.pas(134,11) Hint: Found declaration: ConcatToByteArray(var TBytes;TBytes;TBytes);
xlsxdecrypter.pas(353,50) Error: Incompatible type for arg no. 3: Got "TSHA1Digest", expected "LongWord"
xlsxdecrypter.pas(165,11) Hint: Found declaration: ConcatToByteArray(var TBytes;TBytes;LongWord);
xlsxdecrypter.pas(151,11) Hint: Found declaration: ConcatToByteArray(var TBytes;LongWord;TBytes);
xlsxdecrypter.pas(134,11) Hint: Found declaration: ConcatToByteArray(var TBytes;TBytes;TBytes);
xlsxdecrypter.pas(358,38) Error: Incompatible type for arg no. 2: Got "TSHA1Digest", expected "TBytes"
xlsxdecrypter.pas(165,11) Hint: Found declaration: ConcatToByteArray(var TBytes;TBytes;LongWord);
xlsxdecrypter.pas(151,11) Hint: Found declaration: ConcatToByteArray(var TBytes;LongWord;TBytes);
xlsxdecrypter.pas(134,11) Hint: Found declaration: ConcatToByteArray(var TBytes;TBytes;TBytes);
Fix: change all non-var array parameters of the three ConcatToByteArray versions to const open array of byte
E.g. in line 133
Old: procedure ConcatToByteArray(var outArray: TBytes; Arr1: TBytes; Arr2: TBytes);
New: procedure ConcatToByteArray(var outArray: TBytes; const Arr1: array of byte; Arr2: TBytes);
Steps to reproduce:
Install Lazarus 2.0.6 including FPC 3.04. x86_64 on Windows and install FPSpreadsheet 1.10.1.0 via Online Package Manager including laz_fpspreadsheet_crypto.
Mantis conversion info:
- Mantis ID: 36903