[gnumeric] GnmStyle: fix precondition for conditional style.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] GnmStyle: fix precondition for conditional style.
- Date: Thu, 19 Apr 2018 01:34:18 +0000 (UTC)
commit 85dce0069233d416365af44c28305e10308857d8
Author: Morten Welinder <terra gnome org>
Date: Wed Apr 18 21:33:45 2018 -0400
GnmStyle: fix precondition for conditional style.
(And that's why we have a test suite.)
ChangeLog | 3 +++
src/mstyle.c | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7bd8967..acb2407 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2018-04-18 Morten Welinder <terra gnome org>
+ * src/mstyle.c (gnm_style_get_cond_style): Flip reversed
+ pre-condition.
+
* src/gui-clipboard.c (gnm_x_claim_clipboard): Offer biff8,
including LO's weird name for that. The don't seem to take
"Biff8" and they don't seem to take Citrix' variant either.
diff --git a/src/mstyle.c b/src/mstyle.c
index b46f874..02c2dac 100644
--- a/src/mstyle.c
+++ b/src/mstyle.c
@@ -2085,7 +2085,7 @@ gnm_style_get_cond_style (GnmStyle const *style, int ix)
g_return_val_if_fail (elem_is_set (style, MSTYLE_CONDITIONS), NULL);
g_return_val_if_fail (style->cond_styles != NULL, NULL);
- g_return_val_if_fail (ix < 0 || (unsigned)ix > style->cond_styles->len, NULL);
+ g_return_val_if_fail (ix >= 0 && (unsigned)ix < style->cond_styles->len, NULL);
return g_ptr_array_index (style->cond_styles, ix);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]