diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2018-03-07 15:25:55 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2018-03-07 15:25:55 -0500 |
commit | a774e33ceff6c3eef02aad4f58a11c7e23ff62bb (patch) | |
tree | 36555d06322d4bea7ffe4bf572cf282db2989fcd /src/stdlib.c | |
parent | 77338a6b34d6a164fc2f70e6d736eca8a5b7d251 (diff) |
basic graphing
Diffstat (limited to 'src/stdlib.c')
-rw-r--r-- | src/stdlib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stdlib.c b/src/stdlib.c index 303db4d..ec67ff3 100644 --- a/src/stdlib.c +++ b/src/stdlib.c @@ -40,6 +40,7 @@ char *snprintf(char *buf, unsigned int max, const char *format, ...) break; case 'f': itoa((int)va_arg(args, double), nbuf, 10); + continue; break; default: buf[off++] = format[i]; @@ -47,7 +48,7 @@ char *snprintf(char *buf, unsigned int max, const char *format, ...) break; } if (nbuf[0] != '\0') { - for (unsigned int j = 0; off < max && + for (unsigned int j = 0; off < max && j < 32 && nbuf[j] != '\0'; off++, j++) buf[off] = nbuf[j]; } |