Commit 0c929b71 authored by Matthias Clasen's avatar Matthias Clasen

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.
parent 747962ec
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment