From 9161e9a533978e8cc783c0498c2a69c6fab400ab Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 1 May 2019 14:12:47 +0200 Subject: Don't accidentally add scientific notation for numbers in colours --- libstorycode/stylesheet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libstorycode') diff --git a/libstorycode/stylesheet.c b/libstorycode/stylesheet.c index 896b2d3..eb8b2cb 100644 --- a/libstorycode/stylesheet.c +++ b/libstorycode/stylesheet.c @@ -416,7 +416,7 @@ static void add_text(char **text, size_t *len, size_t *lenmax, const char *prefi static void format_col(char *a, size_t max_len, struct colour col) { if ( !col.hexcode ) { - snprintf(a, max_len, "%.4g,%.4g,%.4g,%.4g", + snprintf(a, max_len, "%.2f,%.2f,%.2f,%.2f", col.rgba[0], col.rgba[1], col.rgba[2], col.rgba[3]); } else { snprintf(a, max_len, "#%.2X%.2X%.2X", -- cgit v1.2.3