diff --git a/tag.c b/tag.c index 0428223..fc09bdc 100644 --- a/tag.c +++ b/tag.c @@ -583,7 +583,7 @@ tags_expand_template(const char *template, const struct tag_set *tags) char str[24]; if (tag->type(tag) == TAG_TYPE_FLOAT) - snprintf(str, sizeof(str), "%f", tag->as_float(tag) / (double)divider); + snprintf(str, sizeof(str), "%.2f", tag->as_float(tag) / (double)divider); else snprintf(str, sizeof(str), "%lu", tag->as_int(tag) / divider); sbuf_append(&formatted, str);