From e469248040b48ecf646e9c064fec6b4890a81420 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Wed, 22 Dec 2010 11:28:58 +0200 Subject: Fixes a Index out of bounds error in Memo. Thanks Michael van Canneyt --- src/gui/fpg_memo.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/fpg_memo.pas b/src/gui/fpg_memo.pas index 789da3c3..8863ca67 100644 --- a/src/gui/fpg_memo.pas +++ b/src/gui/fpg_memo.pas @@ -542,7 +542,7 @@ var begin if ReadOnly then Exit; - if FSelEndLine < 0 then + if (FSelEndLine < 0) or (FSelStartLine<0) then Exit; if (FSelStartLine shl 16) + FSelStartPos <= (FSelEndLine shl 16) + FSelEndPos then -- cgit v1.2.3-70-g09d2