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:
Tim Rühsen 2018-10-28 11:33:27 +01:00 committed by Daniel Stenberg
parent 2c5ec339ea
commit e4f2a5bc1b
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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)