[goffice] Axis: fix out-of-bounds check.



commit 3979debdfecb0f58066aa18ac7739a4b87d7908d
Author: Morten Welinder <terra gnome org>
Date:   Fri Feb 7 11:17:40 2014 -0500

    Axis: fix out-of-bounds check.
    
    && --> ||.

 ChangeLog                |    4 ++++
 goffice/graph/gog-axis.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9eb34c6..7d1e137 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-02-07  Morten Welinder  <terra gnome org>
+
+       * goffice/graph/gog-axis.c (dt_add): && --> ||.  Fixes bug 723820.
+
 2014-01-31  Morten Welinder  <terra gnome org>
 
        * goffice/gtk/go-action-combo-pixmaps.c (cb_toolbar_reconfigured):
diff --git a/goffice/graph/gog-axis.c b/goffice/graph/gog-axis.c
index 218e114..5fad2ca 100644
--- a/goffice/graph/gog-axis.c
+++ b/goffice/graph/gog-axis.c
@@ -897,7 +897,7 @@ typedef struct {
 static gboolean
 dt_add (double *res, double start, double i, const DateStep *step)
 {
-       if (start <= 0 && start > j_horizon)
+       if (start <= 0 || start > j_horizon)
                return FALSE;
 
        switch (step->unit) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]