aboutsummaryrefslogtreecommitdiffstats
path: root/src/stdlib.c
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2018-03-07 15:25:55 -0500
committerClyne Sullivan <tullivan99@gmail.com>2018-03-07 15:25:55 -0500
commita774e33ceff6c3eef02aad4f58a11c7e23ff62bb (patch)
tree36555d06322d4bea7ffe4bf572cf282db2989fcd /src/stdlib.c
parent77338a6b34d6a164fc2f70e6d736eca8a5b7d251 (diff)
basic graphing
Diffstat (limited to 'src/stdlib.c')
-rw-r--r--src/stdlib.c3
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];
}