@@ 9,9 9,9 @@ int32_t string_from_double(char *str, in
{
/* ryu hard-codes 25 for its string allocation for double */
if (sz < 25) {
- snprintf(str, sz, "#ERROR#");
+ return snprintf(str, sz, "#ERROR#");
} else {
- d2s_buffered(d, str);
+ return d2s_buffered_n(d, str);
}
}
@@ 19,9 19,9 @@ int32_t string_from_float(char *str, int
{
/* ryu hard-codes 16 for its string allocation for float */
if (sz < 16) {
- snprintf(str, sz, "#ERROR#");
+ return snprintf(str, sz, "#ERROR#");
} else {
- f2s_buffered(f, str);
+ return f2s_buffered_n(f, str);
}
}