Bug in XLSHTMLParse5.DecodeQuotedPrintable
Posted: Tue Oct 22, 2013 6:29 am
The code in the for loop stretches beyond the length of the string:
I changed it to the following, and got rid of an error that occurred when importing mhtml xls files that were output from SAP. Or the best thing may be to shorten the for loop.
The rest of the code in the loop should be safe, as Copy adjusts itself happily to wrong indexes.
I'm using version 5.20.05.
Code: Select all
for i := 1 to Length(Result) - 1 do begin
if (Result[i] = '&') and (Result[i + 1] = '#') and ((Length(Result) - i) >= 3) then begin
Code: Select all
for i := 1 to Length(Result) - 1 do begin
if ((Length(Result) - i) >= 3) and (Result[i] = '&') and (Result[i + 1] = '#') then begin
I'm using version 5.20.05.