Index: gtk/gtkspinbutton.c
===================================================================
--- gtk/gtkspinbutton.c	(revision 20945)
+++ gtk/gtkspinbutton.c	(arbetskopia)
@@ -1855,20 +1855,19 @@
 			   gdouble        max)
 {
   gdouble value;
+  GtkAdjustment *adj = spin_button->adjustment;
   
   g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button));
 
-  spin_button->adjustment->lower = min;
-  spin_button->adjustment->upper = max;
+  adj->lower = min;
+  adj->upper = max;
 
-  value = CLAMP (spin_button->adjustment->value,
-                 spin_button->adjustment->lower,
-                 (spin_button->adjustment->upper - spin_button->adjustment->page_size));
+  value = CLAMP (adj->value, adj->lower, adj->upper);
 
-  if (value != spin_button->adjustment->value)
+  if (value != adj->value)
     gtk_spin_button_set_value (spin_button, value);
 
-  gtk_adjustment_changed (spin_button->adjustment);
+  gtk_adjustment_changed (adj);
 }
 
 /**
