From b47ddd730defeab3043ffa42b0e9804a94684acc Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sat, 27 Mar 2010 08:04:27 +0000 Subject: [PATCH] Min() and Max() break 64 bit Integers to 32 bit. Avoid using these functions in relevant context. Fixes issue #1803. --- source/main.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/main.pas b/source/main.pas index f84d025d..4f53655b 100644 --- a/source/main.pas +++ b/source/main.pas @@ -3742,8 +3742,8 @@ begin NumObj := StrToIntDef(NumObjects.Values[Obj.ObjType], 0); Inc(NumObj); NumObjects.Values[Obj.ObjType] := IntToStr(NumObj); - DBObjectsMaxSize := Max(DBObjectsMaxSize, Obj.Size); - DBObjectsMaxRows := Max(DBObjectsMaxRows, Obj.Rows); + if Obj.Size > DBObjectsMaxSize then DBObjectsMaxSize := Obj.Size; + if Obj.Rows > DBObjectsMaxRows then DBObjectsMaxRows := Obj.Rows; end; Msg := ActiveDatabase + ': ' + FormatNumber(Objects.Count) + ' '; if NumObjects.Count = 1 then @@ -5996,7 +5996,7 @@ begin // Add minimal margin to cell edges InflateRect(CellRect, -1, -1); - CellWidth := CellRect.Right - CellRect.Left - 4; + CellWidth := CellRect.Right - CellRect.Left; BarWidth := Round(CellWidth / Max * Value); if BarWidth > 0 then begin