summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/common/sprintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/common/sprintf.c b/firmware/common/sprintf.c
index 80bdda6..c18a390 100644
--- a/firmware/common/sprintf.c
+++ b/firmware/common/sprintf.c
@@ -100,10 +100,10 @@ int vsnprintf (char *buf, int size, const char *fmt, va_list ap)
if (width > 0)
{
width -= strlen (str);
- while (width-- > 0 && buf < end)
+ while (width-- > 0 && bp < end)
*bp++ = pad;
}
- while (*str != '\0' && buf < end)
+ while (*str != '\0' && bp < end)
*bp++ = *str++;
}
else