[gnumeric] Conditions: improve valid check.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Conditions: improve valid check.
- Date: Fri, 19 Jul 2013 16:45:32 +0000 (UTC)
commit ddead8206bcbd3d19a7ec0e6d05ed10ceac271a0
Author: Morten Welinder <terra gnome org>
Date: Fri Jul 19 12:44:41 2013 -0400
Conditions: improve valid check.
ChangeLog | 5 +++++
NEWS | 1 +
src/style-conditions.c | 3 ++-
3 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6c2ade4..4b160ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-19 Morten Welinder <terra gnome org>
+
+ * src/style-conditions.c (gnm_style_cond_is_valid): Even stricter
+ check: the enum has a hole in the middle. Fixes #704562.
+
2013-07-19 Jean Brefort <jean brefort normalesup org>
* src/gnm-so-filled.c (gnm_so_filled_draw_cairo): fix text wrap when
diff --git a/NEWS b/NEWS
index 809be6c..a4c75c7 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ Jean:
Morten:
* Fix crazy parsing problem. [#704109] [#704140]
* Fix crashes on corrupted files. [#704102] [#704004] [#704325]
+ [#704562]
--------------------------------------------------------------------------
Gnumeric 1.12.4
diff --git a/src/style-conditions.c b/src/style-conditions.c
index 3db120b..f3280c3 100644
--- a/src/style-conditions.c
+++ b/src/style-conditions.c
@@ -103,7 +103,8 @@ gnm_style_cond_is_valid (GnmStyleCond const *cond)
if (cond->overlay == NULL)
return FALSE;
- if ((unsigned)cond->op > (unsigned)GNM_STYLE_COND_NOT_CONTAINS_BLANKS)
+ if ((unsigned)cond->op > (unsigned)GNM_STYLE_COND_NOT_CONTAINS_BLANKS ||
+ (cond->op > GNM_STYLE_COND_CUSTOM && cond->op < GNM_STYLE_COND_CONTAINS_STR))
return FALSE;
N = gnm_style_cond_op_operands (cond->op);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]