From 0c929b7124ce19a838a3acdc735533fa61d02750 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 9 Mar 2016 19:40:06 -0500 Subject: [PATCH] inspector: Avoid overflow when editing doubles The adjustment double properties allow values from -G_MAXDOUBLE to G_MAXDOUBLE, which leads to overflow when calculating max - min / 10. To avoid that, simply use a fixed page_size of 1.0. --- gtk/inspector/prop-editor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/inspector/prop-editor.c b/gtk/inspector/prop-editor.c index cd855adc22..2c75cc73cc 100644 --- a/gtk/inspector/prop-editor.c +++ b/gtk/inspector/prop-editor.c @@ -915,7 +915,7 @@ property_editor (GObject *object, G_PARAM_SPEC_DOUBLE (spec)->minimum, G_PARAM_SPEC_DOUBLE (spec)->maximum, 0.1, - MAX ((G_PARAM_SPEC_DOUBLE (spec)->maximum - G_PARAM_SPEC_DOUBLE (spec)->minimum) / 10, 0.1), + 1.0, 0.0); prop_edit = gtk_spin_button_new (adj, 0.1, 2);