From afcd16b76caf028b17d6388b0db9ba4c082c36a6 Mon Sep 17 00:00:00 2001 From: ask Date: Sun, 28 Nov 2010 12:24:01 +0000 Subject: [PATCH] TAChart: Protect the usage of Infinity from the R+/O+ checks. This should fix issue #18018 git-svn-id: trunk@28525 - --- components/tachart/tafuncseries.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/tachart/tafuncseries.pas b/components/tachart/tafuncseries.pas index 098e5fd0b9..83ee91b0ea 100644 --- a/components/tachart/tafuncseries.pas +++ b/components/tachart/tafuncseries.pas @@ -135,6 +135,9 @@ implementation uses Math, SysUtils, TAGraph; +{$IFOPT R+}{$DEFINE RangeChecking}{$ELSE}{$UNDEF RangeChecking}{$ENDIF} +{$IFOPT Q+}{$DEFINE OverflowChecking}{$ELSE}{$UNDEF OverflowChecking}{$ENDIF} + { TBasicFuncSeries } procedure TBasicFuncSeries.AfterAdd; @@ -285,7 +288,9 @@ var v1, v2: Double; begin if ColorSource = nil then exit(clTAColor); + {$R-}{$Q-} ColorSource.FindBounds(AValue, Infinity, lb, ub); + {$IFDEF OverflowChecking}{$Q+}{$ENDIF}{$IFDEF RangeChecking}{$R+}{$ENDIF} if Interpolate and InRange(lb, 1, ColorSource.Count - 1) then begin with ColorSource[lb - 1]^ do begin v1 := X;