device/lib/pic16/libc/stdio/vsprintf.c: enlarge buffer for x_ftoa()
[fw/sdcc] / device / lib / pic16 / libc / stdio / vfprintf.c
index fc2433434d9b40e1ac7c2bc05672d451808357e6..3d3137cc285b0428741a798f94bd44a589fbee1f 100644 (file)
  */
 #define EXTRA_INTEGER
 
-#ifdef BINARY_SPECIFIER
+#if defined(USE_FLOATS)
+/* x_ftoa requires up to 8 digits (integral part) + '.' + 24 digits
+ * (fractional part). Adding a sign and a NUL byte yields 35 byte. */
+# define BUF_SIZE       36
+#elif defined(BINARY_SPECIFIER)
 /* "%lb" = "0" - "11111111111111111111111111111111" */
 # define BUF_SIZE       33
 #else