mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 11:19:26 +02:00
TAChart: Fix SIGFPE with incorrect values of Intervals.NiceSteps
git-svn-id: trunk@32364 -
This commit is contained in:
parent
a31b96ae04
commit
4c3a22cbc2
@ -200,6 +200,7 @@ procedure TIntervalChartSource.CalculateIntervals(
|
||||
m, start: Double;
|
||||
mi, prev, cnt: Integer;
|
||||
begin
|
||||
if AStep <= 0 then exit;
|
||||
start := Int(AParams.FMin / AStep) * AStep;
|
||||
m := start;
|
||||
prev := AParams.ToImage(m);
|
||||
@ -232,7 +233,7 @@ begin
|
||||
while s >= Max(AParams.CountToStep(maxCount), AParams.FMinStep) do begin
|
||||
for sv in Params.StepValues do
|
||||
TryStep(s * sv, bestCount);
|
||||
// We are not required to pick best count, so any one will do.
|
||||
// We are not required to pick the best count, so any one will do.
|
||||
if not (aipUseCount in Params.Options) and (bestCount > 0) then break;
|
||||
s *= 0.1;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user