helpers.c:printv() - Iterate over size of buffer

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-09-24 20:40:44 +02:00
parent 376811c1a7
commit 2e66db3fea
+1 -1
View File
@@ -93,7 +93,7 @@ void printv(const char *fmt, va_list ap)
len = strlen(buf);
buf[len++] = ' ';
for (int i = (int)len; i < (SCREEN_WIDTH - 8); i++)
for (size_t i = len; i < (sizeof(buf) - 8); i++)
buf[i] = '.'; /* pad with dots. */
fprintf(stderr, "\r%s ", buf);