summaryrefslogtreecommitdiff
path: root/libweston
diff options
context:
space:
mode:
authorLeandro Ribeiro <leandro.ribeiro@collabora.com>2023-03-10 09:03:17 -0300
committerPekka Paalanen <pq@iki.fi>2023-04-12 10:03:32 +0000
commitcb542dd56a0198e756f1e82475124e239db7d012 (patch)
tree1803ad21b094e22eaa67567dfd2d13c1e051bc6f /libweston
parent8a1f56310cbcd9ea014ca2c86b962d64744ac878 (diff)
downloadweston-cb542dd56a0198e756f1e82475124e239db7d012.tar.gz
color-lcms: save ICC profile version string with a single decimal value
We have a string describing the ICC profile. cmsGetProfileVersion() returns a float value, and we are converting that to string with "%f" and saving to this description. Instead, use "%.1f" to restrict it to a single decimal value, which is enough. With this change we have e.g. "version 4.4" instead of "version 4.4000000". Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Diffstat (limited to 'libweston')
-rw-r--r--libweston/color-lcms/color-profile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libweston/color-lcms/color-profile.c b/libweston/color-lcms/color-profile.c
index 98cff21a..431348b2 100644
--- a/libweston/color-lcms/color-profile.c
+++ b/libweston/color-lcms/color-profile.c
@@ -364,7 +364,7 @@ make_icc_file_description(cmsHPROFILE profile,
"%02x", md5sum->bytes[i]);
}
- str_printf(&desc, "ICCv%f %s %s", cmsGetProfileVersion(profile),
+ str_printf(&desc, "ICCv%.1f %s %s", cmsGetProfileVersion(profile),
name_part, md5sum_str);
return desc;