aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-05-01 14:12:47 +0200
committerThomas White <taw@bitwiz.me.uk>2019-05-01 14:12:47 +0200
commit9161e9a533978e8cc783c0498c2a69c6fab400ab (patch)
tree1d8488e80fb9806e764bb4235a75ccae47bbdf4e
parent6790161a08e51212ef69c564e7629960597c84bc (diff)
Don't accidentally add scientific notation for numbers in colours
-rw-r--r--libstorycode/stylesheet.c2
1 files changed, 1 insertions, 1 deletions
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",