0f0a1bbf1710 — Chris Cannam 10 months ago
Fix api usage
1 files changed, 4 insertions(+), 4 deletions(-)

M number-string-ryu.c
M number-string-ryu.c +4 -4
@@ 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);
     }
 }