summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2010-12-22 11:28:58 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2010-12-22 11:28:58 +0200
commite469248040b48ecf646e9c064fec6b4890a81420 (patch)
treedfc1423723166d33287f8ac9c88b7bc31e8f748c
parent5e8d895d00ee131574b434c632b04d557d056cad (diff)
downloadfpGUI-e469248040b48ecf646e9c064fec6b4890a81420.tar.xz
Fixes a Index out of bounds error in Memo. Thanks Michael van Canneyt
-rw-r--r--src/gui/fpg_memo.pas2
1 files changed, 1 insertions, 1 deletions
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