diff --git a/components/fpspreadsheet/fpsutils.pas b/components/fpspreadsheet/fpsutils.pas index a1fc9f826..7b593f122 100644 --- a/components/fpspreadsheet/fpsutils.pas +++ b/components/fpspreadsheet/fpsutils.pas @@ -498,6 +498,9 @@ function ParseCellString(const AStr: String; out ACellRow, ACellCol: Cardinal; isAbs := (AStr[i] = '$'); if isAbs then inc(i); + if i > Length(AStr) then + exit; + // Scan digits while (i <= Length(AStr)) do begin if (AStr[i] in DIGITS) then begin