From 257fd65a2c108b2d6ad971c410006a436fe4a982 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Thu, 21 Aug 2014 22:04:35 +0000 Subject: [PATCH] fpspreadsheet: Fix ParseCellString to return false if string is without row part. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3499 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/fpsutils.pas | 3 +++ 1 file changed, 3 insertions(+) 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