LCL: Prevent range overflow in TGtkDeviceContext.FillRect. Cast Cardinal -> TColor. Issue #26897.

git-svn-id: trunk@47027 -
This commit is contained in:
juha 2014-11-29 13:41:37 +00:00
parent 1bc29130cf
commit 841a604d6e
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ uses
// LCL
Gtk2Extra,
LCLIntf, LCLProc, LCLType, LCLMemManager, DynHashArray,
GraphType, Gtk2Globals;
GraphType, Gtk2Globals, Graphics {for TColor};
{$ifdef TraceGdiCalls}
const

View File

@ -792,7 +792,7 @@ begin
ClipArea := ClipRect;
RemovePixbuf;
if (CurrentBrush^.GDIBrushFill = GDK_SOLID) and
(IsBackgroundColor(CurrentBrush^.GDIBrushColor.ColorRef)) then
(IsBackgroundColor(TColor(CurrentBrush^.GDIBrushColor.ColorRef))) then
StyleFillRectangle(Drawable, GC,
CurrentBrush^.GDIBrushColor.ColorRef,
ARect.Left + DCOrigin.X, ARect.Top + DCOrigin.Y,