Use g_ascii_dtostr() instead of g_ascii_formatd()

The latter is broken and doesn't guarantee a decimal point with the
current bug. Also, g_ascii_dtostr() doesn't need the format parameter
and produces nicer output.

(cherry picked from commit c0fb66254e)
This commit is contained in:
Michael Natterer
2019-07-30 15:57:36 +02:00
parent 77dd2982a5
commit c9ded16963
11 changed files with 160 additions and 175 deletions

View File

@ -936,8 +936,8 @@ gimp_levels_config_save_cruft (GimpLevelsConfig *config,
(gint) (config->high_input[i] * 255.999),
(gint) (config->low_output[i] * 255.999),
(gint) (config->high_output[i] * 255.999),
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
config->gamma[i]));
g_ascii_dtostr (buf, G_ASCII_DTOSTR_BUF_SIZE,
config->gamma[i]));
}
if (! g_output_stream_write_all (output, string->str, string->len,