diff --git a/src/backends/meta-monitor-config-store.c b/src/backends/meta-monitor-config-store.c index 377d8debf..7650334ed 100644 --- a/src/backends/meta-monitor-config-store.c +++ b/src/backends/meta-monitor-config-store.c @@ -1508,6 +1508,10 @@ append_monitors (GString *buffer, for (l = monitor_configs; l; l = l->next) { MetaMonitorConfig *monitor_config = l->data; + char rate_str[G_ASCII_DTOSTR_BUF_SIZE]; + + g_ascii_formatd (rate_str, sizeof (rate_str), + "%.3f", monitor_config->mode_spec->refresh_rate); g_string_append (buffer, " \n"); append_monitor_spec (buffer, monitor_config->monitor_spec, " "); @@ -1516,8 +1520,8 @@ append_monitors (GString *buffer, monitor_config->mode_spec->width); g_string_append_printf (buffer, " %d\n", monitor_config->mode_spec->height); - g_string_append_printf (buffer, " %.3f\n", - monitor_config->mode_spec->refresh_rate); + g_string_append_printf (buffer, " %s\n", + rate_str); if (monitor_config->mode_spec->flags & META_CRTC_MODE_FLAG_INTERLACE) g_string_append_printf (buffer, " interlace\n"); g_string_append (buffer, " \n");