fix range check error that could also cause AV (issue #0010892)

git-svn-id: trunk@14254 -
This commit is contained in:
paul 2008-02-26 08:57:05 +00:00
parent 8e4a1950a9
commit 8b91f41f9e

View File

@ -2924,7 +2924,7 @@ begin
EditorLine := FEditor.Lines[YLine-1];
if Length(Trim(EditorLine)) = 0 then Exit;
if XLine > Length(EditorLine) then Exit;
if (XLine > Length(EditorLine)) or (XLine < 1) then Exit;
if not (EditorLine[XLine] in ALeftLimit) then Exit;
//walk backwards to a space or non-standard character.