Merge branch 'cherry-pick-ae2ef147' into 'master'

gtk: fix weed_out_neg_zero() in spinbutton and scale

See merge request GNOME/gtk!906
This commit is contained in:
Benjamin Otte 2019-06-03 11:29:54 +00:00
commit 3ae15aad16
2 changed files with 2 additions and 2 deletions

View File

@ -1544,7 +1544,7 @@ weed_out_neg_zero (gchar *str,
gchar neg_zero[8]; gchar neg_zero[8];
g_snprintf (neg_zero, 8, "%0.*f", digits, -0.0); g_snprintf (neg_zero, 8, "%0.*f", digits, -0.0);
if (strcmp (neg_zero, str) == 0) if (strcmp (neg_zero, str) == 0)
memmove (str, str + 1, strlen (str) - 1); memmove (str, str + 1, strlen (str));
} }
return str; return str;
} }

View File

@ -1101,7 +1101,7 @@ weed_out_neg_zero (gchar *str,
gchar neg_zero[8]; gchar neg_zero[8];
g_snprintf (neg_zero, 8, "%0.*f", digits, -0.0); g_snprintf (neg_zero, 8, "%0.*f", digits, -0.0);
if (strcmp (neg_zero, str) == 0) if (strcmp (neg_zero, str) == 0)
memmove (str, str + 1, strlen (str) - 1); memmove (str, str + 1, strlen (str));
} }
return str; return str;
} }