Fix build of commit f23e99b

Commit f23e99b made use of snprintf(), which is not universally available.
Fix this by using g_snprintf().
This commit is contained in:
Chun-wei Fan
2016-06-27 11:53:30 +08:00
parent 325fc60931
commit cd44f6d875
2 changed files with 2 additions and 2 deletions

View File

@@ -1939,7 +1939,7 @@ weed_out_neg_zero (gchar *str, gint digits)
if (str[0] == '-')
{
gchar neg_zero[8];
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)
memmove (str, str + 1, strlen (str) - 1);
}

View File

@@ -1121,7 +1121,7 @@ weed_out_neg_zero (gchar *str, gint digits)
if (str[0] == '-')
{
gchar neg_zero[8];
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)
memmove (str, str + 1, strlen (str) - 1);
}