gtk interface: fixed range errors in underlining short cuts (bug #8602) from Colin Western

git-svn-id: trunk@10861 -
This commit is contained in:
vincents 2007-04-03 20:42:46 +00:00
parent 5eb5cdde43
commit 08761b6cee

View File

@ -3109,9 +3109,13 @@ var
begin
AStr := Copy(String(theLine), 1, LineLength);
if (Flags and DT_NoPrefix) <> DT_NoPrefix then
pIndex := DeleteAmpersands(aStr)
else
if (Flags and DT_NoPrefix) <> DT_NoPrefix then begin
pIndex := DeleteAmpersands(aStr);
If Length(aStr) = 0 then
Exit; { String consists of '&' only }
If pIndex > Length(aStr) then
pIndex := -1; { String ended in '&', which was deleted }
end else
pIndex := -1;
if TempBrush = HBRUSH(-1) then