TAChart: Fix SIGFPE with incorrect values of Intervals.NiceSteps

git-svn-id: trunk@32364 -
This commit is contained in:
ask 2011-09-16 09:32:56 +00:00
parent a31b96ae04
commit 4c3a22cbc2

View File

@ -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;