Validate arg count for OR function
To be compatible with Excel, at least 1 argument is required. Fixes #175
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
c59148bdf6
commit
17cd1fee96
@@ -136,6 +136,9 @@ impl Model {
|
||||
}
|
||||
|
||||
pub(crate) fn fn_or(&mut self, args: &[Node], cell: CellReferenceIndex) -> CalcResult {
|
||||
if args.is_empty() {
|
||||
return CalcResult::new_args_number_error(cell);
|
||||
}
|
||||
let mut result = false;
|
||||
for arg in args {
|
||||
match self.evaluate_node_in_context(arg, cell) {
|
||||
|
||||
Reference in New Issue
Block a user