]> Pileus Git - ~andy/gtk/commitdiff
Handle 0 increment, to fix division-by-zero problem. (#82816, George
authorOwen Taylor <otaylor@redhat.com>
Wed, 12 Jun 2002 19:42:48 +0000 (19:42 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 12 Jun 2002 19:42:48 +0000 (19:42 +0000)
Wed Jun 12 15:43:38 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
        0 increment, to fix division-by-zero problem.
        (#82816, George Lebl.)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkspinbutton.c

index 639a66b113e486d0b17e76aa6131e20d8f885103..7e0855c453ac1e70c76e44f5706ac5d27cb95e4d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Jun 12 15:43:38 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
+       0 increment, to fix division-by-zero problem.
+       (#82816, George Lebl.)
+
 Wed Jun 12 15:38:01 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
index 639a66b113e486d0b17e76aa6131e20d8f885103..7e0855c453ac1e70c76e44f5706ac5d27cb95e4d 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jun 12 15:43:38 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
+       0 increment, to fix division-by-zero problem.
+       (#82816, George Lebl.)
+
 Wed Jun 12 15:38:01 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
index 639a66b113e486d0b17e76aa6131e20d8f885103..7e0855c453ac1e70c76e44f5706ac5d27cb95e4d 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jun 12 15:43:38 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
+       0 increment, to fix division-by-zero problem.
+       (#82816, George Lebl.)
+
 Wed Jun 12 15:38:01 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
index 639a66b113e486d0b17e76aa6131e20d8f885103..7e0855c453ac1e70c76e44f5706ac5d27cb95e4d 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jun 12 15:43:38 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
+       0 increment, to fix division-by-zero problem.
+       (#82816, George Lebl.)
+
 Wed Jun 12 15:38:01 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
index 639a66b113e486d0b17e76aa6131e20d8f885103..7e0855c453ac1e70c76e44f5706ac5d27cb95e4d 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jun 12 15:43:38 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
+       0 increment, to fix division-by-zero problem.
+       (#82816, George Lebl.)
+
 Wed Jun 12 15:38:01 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
index 639a66b113e486d0b17e76aa6131e20d8f885103..7e0855c453ac1e70c76e44f5706ac5d27cb95e4d 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jun 12 15:43:38 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
+       0 increment, to fix division-by-zero problem.
+       (#82816, George Lebl.)
+
 Wed Jun 12 15:38:01 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
index 8642b271bfc5950249ead430be5be7aa1c9f8015..7c7efc8720e4137873244373d23f7cb6f99e0067 100644 (file)
@@ -1318,6 +1318,9 @@ gtk_spin_button_snap (GtkSpinButton *spin_button,
   gdouble tmp;
 
   inc = spin_button->adjustment->step_increment;
+  if (inc == 0)
+    return;
+  
   tmp = (val - spin_button->adjustment->lower) / inc;
   if (tmp - floor (tmp) < ceil (tmp) - tmp)
     val = spin_button->adjustment->lower + floor (tmp) * inc;