diff options
author | Michael Natterer <mitch@gimp.org> | 2019-06-03 00:22:20 +0000 |
---|---|---|
committer | Benjamin Otte <otte.benjamin@googlemail.com> | 2019-06-03 00:34:44 +0000 |
commit | caf50bcb93013cb0875ba101ffa0d4e7e74dcfb3 (patch) | |
tree | 789b3676955675651f5bf2ef3dde218b2623b4ba /gtk/gtkscale.c | |
parent | 7e9cb07a925f78e3961c70ee0b896738b4d1520b (diff) | |
download | gtk+-caf50bcb93013cb0875ba101ffa0d4e7e74dcfb3.tar.gz |
gtk: fix weed_out_neg_zero() in spinbutton and scale
It was not copying the terminating \0 in the string, breaking output
in spinbutton (didn't try scale). Fixes #3452.
(cherry picked from commit ae2ef1472c69ad61ed8d19d932da4ca04c2a13ef)
Diffstat (limited to 'gtk/gtkscale.c')
-rw-r--r-- | gtk/gtkscale.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index 70369410bf..887af19200 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -1544,7 +1544,7 @@ weed_out_neg_zero (gchar *str, gchar neg_zero[8]; g_snprintf (neg_zero, 8, "%0.*f", digits, -0.0); if (strcmp (neg_zero, str) == 0) - memmove (str, str + 1, strlen (str) - 1); + memmove (str, str + 1, strlen (str)); } return str; } |