From 1a11ab00d898c4484bc0f518a1d53b1f4cbf5fb4 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Wed, 18 Apr 2018 23:17:25 -0400 Subject: SD cardgit status FAT32git status Beautiful! --- src/stdlib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/stdlib.c') diff --git a/src/stdlib.c b/src/stdlib.c index 4714e93..a47fb03 100644 --- a/src/stdlib.c +++ b/src/stdlib.c @@ -85,7 +85,6 @@ char *snprintf(char *buf, unsigned int max, const char *format, ...) float strtof(const char *s, char **endptr) { - (void)s; (void)endptr; float res = 0.0f; @@ -139,6 +138,12 @@ char *ftostr(char *buf, float f) if (buf == 0) return 0; + if (f == 0) { + buf[0] = '0'; + buf[1] = '\0'; + return buf; + } + unsigned int i = 0; // offset // strip decimals, convert in reverse -- cgit v1.2.3