fpspreadsheet: Fix formula AVERAGE crashing when all values contain errors.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9447 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
cac2143536
commit
712ce264ee
@ -8,7 +8,7 @@ unit fpsfunc;
|
|||||||
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
|
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, fpstypes;
|
Classes, SysUtils, fpstypes;
|
||||||
|
|
||||||
function CompareStringWithWildcards(AString1, AString2: String): Boolean;
|
function CompareStringWithWildcards(AString1, AString2: String): Boolean;
|
||||||
@ -1743,6 +1743,9 @@ var
|
|||||||
err: TsErrorValue;
|
err: TsErrorValue;
|
||||||
begin
|
begin
|
||||||
ArgsToFloatArray(Args, data, err);
|
ArgsToFloatArray(Args, data, err);
|
||||||
|
if Length(data) = 0 then
|
||||||
|
Result := ErrorResult(errDivideByZero)
|
||||||
|
else
|
||||||
if err <> errOK then
|
if err <> errOK then
|
||||||
Result := ErrorResult(err)
|
Result := ErrorResult(err)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user