mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 02:41:51 +02:00
TAChart: fix rare arithmetic overflow in logarithmic axis labeling
git-svn-id: trunk@44860 -
This commit is contained in:
parent
0ad8e4e70f
commit
a3cf4354b2
@ -110,7 +110,7 @@ type
|
||||
FUseY: Boolean;
|
||||
|
||||
function CountToStep(ACount: Integer): Double; inline;
|
||||
function IsAcceptableStep(AStep: Integer): Boolean; inline;
|
||||
function IsAcceptableStep(AStep: Int64): Boolean; inline;
|
||||
procedure RoundToImage(var AValue: Double);
|
||||
function ToImage(AX: Double): Integer; inline;
|
||||
end;
|
||||
@ -248,7 +248,7 @@ begin
|
||||
Result := Power(10, Floor(Log10((FMax - FMin) / ACount)));
|
||||
end;
|
||||
|
||||
function TValuesInRangeParams.IsAcceptableStep(AStep: Integer): Boolean;
|
||||
function TValuesInRangeParams.IsAcceptableStep(AStep: Int64): Boolean;
|
||||
begin
|
||||
with FIntervals do
|
||||
Result := not (
|
||||
|
@ -207,7 +207,7 @@ procedure TIntervalChartSource.CalculateIntervals(
|
||||
procedure TryStep(AStep: Double; var ABestCount: Integer);
|
||||
var
|
||||
m, start: Double;
|
||||
mi, prev, cnt: Integer;
|
||||
mi, prev, cnt: Int64;
|
||||
begin
|
||||
if AStep <= 0 then exit;
|
||||
start := Int(AParams.FMin / AStep) * AStep;
|
||||
|
Loading…
Reference in New Issue
Block a user