[gnumeric] xls: prevent critical.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xls: prevent critical.
- Date: Tue, 21 Nov 2017 00:15:54 +0000 (UTC)
commit 9cc923f3a1fb1e93c44ccbd772bac2c2b383c761
Author: Morten Welinder <terra gnome org>
Date: Mon Nov 20 19:15:28 2017 -0500
xls: prevent critical.
plugins/excel/ChangeLog | 6 ++++++
plugins/excel/ms-formula-write.c | 6 ++++--
2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 8569a1e..ffa9586 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,9 @@
+2017-11-20 Morten Welinder <terra gnome org>
+
+ * ms-formula-write.c (xl_map_char_to_type): Improve debug output.
+ (write_funcall): Avoid a critical for ERROR function. This might
+ not be right -- need to check what XL wants for this.
+
2017-11-18 Morten Welinder <terra gnome org>
* Release 1.12.36
diff --git a/plugins/excel/ms-formula-write.c b/plugins/excel/ms-formula-write.c
index 0111b5b..de93246 100644
--- a/plugins/excel/ms-formula-write.c
+++ b/plugins/excel/ms-formula-write.c
@@ -231,7 +231,7 @@ xl_map_char_to_type (char t)
return XL_ARRAY;
if (t == 'v')
return XL_ROOT;
- g_warning ("unknown op class '%c' assuming val", t);
+ g_warning ("unknown op class '%c' assuming val", t ? t : '-');
return XL_VAL;
}
@@ -553,7 +553,9 @@ write_funcall (PolishData *pd, GnmExpr const *expr,
min_args = ef->efunc->min_args;
max_args = ef->efunc->max_args;
func_idx = ef->efunc->idx;
- func_type = xl_map_char_to_type (ef->efunc->type);
+ func_type = ef->efunc->type
+ ? xl_map_char_to_type (ef->efunc->type)
+ : XL_VAL; // Assumption
arg_types = ef->efunc->known_args;
} else {
min_args = max_args = expr->func.argc;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]