diff options
author | tlatorre <tlatorre@uchicago.edu> | 2019-05-24 11:55:19 -0400 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2019-05-24 11:55:19 -0400 |
commit | 38a2d79ea9fac199b34653f3f89dc731d5b84b8c (patch) | |
tree | d293c84cac7cb84a3222165d5a8cec21d05c561c /src | |
parent | b3ef3430c0fb025771501766286c176ca7411445 (diff) | |
download | sddm-38a2d79ea9fac199b34653f3f89dc731d5b84b8c.tar.gz sddm-38a2d79ea9fac199b34653f3f89dc731d5b84b8c.tar.bz2 sddm-38a2d79ea9fac199b34653f3f89dc731d5b84b8c.zip |
update sprintf_yaml_list()
This commit changes the format specifier for the values in sprintf_yaml_list()
from %.2g -> %.2f because YAML (at least the python parser) doesn't recognize
values like 1e+03 as floats.
Diffstat (limited to 'src')
-rw-r--r-- | src/fit.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5844,14 +5844,14 @@ void sprintf_yaml_list(double *a, size_t n, size_t stride, char *str) size_t i; if (n == 1) { - sprintf(str,"%.2g",*a); + sprintf(str,"%.2f",*a); return; } - sprintf(str,"[%.2g",*a); + sprintf(str,"[%.2f",*a); for (i = 1; i < n; i++) - sprintf(str+strlen(str),",%.2g",a[stride*i]); + sprintf(str+strlen(str),",%.2f",a[stride*i]); sprintf(str+strlen(str),"]"); } |