diff options
Diffstat (limited to 'firmware/common')
-rw-r--r-- | firmware/common/sprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/common/sprintf.c b/firmware/common/sprintf.c index 80bdda6336..c18a390b44 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) | |||
100 | if (width > 0) | 100 | if (width > 0) |
101 | { | 101 | { |
102 | width -= strlen (str); | 102 | width -= strlen (str); |
103 | while (width-- > 0 && buf < end) | 103 | while (width-- > 0 && bp < end) |
104 | *bp++ = pad; | 104 | *bp++ = pad; |
105 | } | 105 | } |
106 | while (*str != '\0' && buf < end) | 106 | while (*str != '\0' && bp < end) |
107 | *bp++ = *str++; | 107 | *bp++ = *str++; |
108 | } | 108 | } |
109 | else | 109 | else |