X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=driver%2Fdemo-Gtk-conf.c;h=cf34f15b8c25fd68e3036fdea842fda1a7864a5d;hp=745c6547e33571ca8ca6746febb36bb6c770d6b3;hb=bc7b7a8eb122206d239ec0e693676bcce31be1aa;hpb=ffd8c0873576a9e3065696a624dce6b766b77062 diff --git a/driver/demo-Gtk-conf.c b/driver/demo-Gtk-conf.c index 745c6547..cf34f15b 100644 --- a/driver/demo-Gtk-conf.c +++ b/driver/demo-Gtk-conf.c @@ -1280,7 +1280,7 @@ parameter_to_switch (parameter *p) return 0; if (p->integer_p) - sprintf (buf, "%d", (int) (value + 0.5)); + sprintf (buf, "%d", (int) (value + (value > 0 ? 0.5 : -0.5))); else sprintf (buf, "%.4f", value);