mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08:00
mprintf: avoid unsigned integer overflow warning
The overflow has no real world impact. Just avoid it for "best practice". Code change suggested by "The Infinnovation Team" and Daniel Stenberg. Closes #3184
This commit is contained in:
parent
2c5ec339ea
commit
e4f2a5bc1b
@ -835,7 +835,7 @@ static int dprintf_formatf(
|
|||||||
while(width-- > 0)
|
while(width-- > 0)
|
||||||
OUTCHAR(' ');
|
OUTCHAR(' ');
|
||||||
|
|
||||||
while((len-- > 0) && *str)
|
for(; len && *str; len--)
|
||||||
OUTCHAR(*str++);
|
OUTCHAR(*str++);
|
||||||
if(p->flags&FLAGS_LEFT)
|
if(p->flags&FLAGS_LEFT)
|
||||||
while(width-- > 0)
|
while(width-- > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user