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
@ -1743,6 +1743,9 @@ var
|
||||
err: TsErrorValue;
|
||||
begin
|
||||
ArgsToFloatArray(Args, data, err);
|
||||
if Length(data) = 0 then
|
||||
Result := ErrorResult(errDivideByZero)
|
||||
else
|
||||
if err <> errOK then
|
||||
Result := ErrorResult(err)
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user