Skip to content

Commit

Permalink
better range-check in CanvasTextOut
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Sep 5, 2024
1 parent cb8b218 commit e9b7459
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions atsynedit/atsynedit_canvasproc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ procedure CanvasTextOut(C: TCanvas;
else
PixOffset1:= 0;

i:= Min(PartOffset+PartLen, Length(AText));
i:= Min(PartOffset+PartLen, ListInt.Len);
if i>0 then
PixOffset2:= ListInt.Data[i-1]
else
Expand Down Expand Up @@ -897,7 +897,7 @@ procedure CanvasTextOut(C: TCanvas;
else
PixOffset1:= 0;

i:= Min(PartOffset+PartLen, Length(AText));
i:= Min(PartOffset+PartLen, ListInt.Len);
if i>0 then
PixOffset2:= ListInt.Data[i-1]
else
Expand Down

0 comments on commit e9b7459

Please sign in to comment.