summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte.benjamin@googlemail.com>2019-06-03 11:29:54 +0000
committerBenjamin Otte <otte.benjamin@googlemail.com>2019-06-03 11:29:54 +0000
commit3ae15aad164fb06fc4411ec95c652a23ecc6c62f (patch)
tree27092d143cfb171568874b344ee6fca007274d88
parent42e0c9892ce53c7ea3d376d84e4c86887b830c7e (diff)
parentcaf50bcb93013cb0875ba101ffa0d4e7e74dcfb3 (diff)
downloadgtk+-3ae15aad164fb06fc4411ec95c652a23ecc6c62f.tar.gz
Merge branch 'cherry-pick-ae2ef147' into 'master'
gtk: fix weed_out_neg_zero() in spinbutton and scale See merge request GNOME/gtk!906
-rw-r--r--gtk/gtkscale.c2
-rw-r--r--gtk/gtkspinbutton.c2
2 files changed, 2 insertions, 2 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;
}
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index e4ddfaecb6..e673bd3a03 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -1101,7 +1101,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;
}