mirror of
https://git.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
synced 2024-12-28 04:23:38 +01:00
stdio: fix %N.Ms miscalculating spacing if M > strlen(arg)
This commit is contained in:
parent
05ff5e246d
commit
46c73cbc87
1 changed files with 2 additions and 0 deletions
|
@ -59,6 +59,8 @@ void __printf_format_s(
|
|||
size_t len = 0;
|
||||
uint32_t precision = opt->precision ? opt->precision : (-1);
|
||||
while(s[len] && len < precision) len++;
|
||||
/* Cap precision to real value for __printf_compute_geometry() */
|
||||
opt->precision = len;
|
||||
|
||||
struct __printf_geometry g = {
|
||||
.prefix = 0, .sign = 0, .content = len,
|
||||
|
|
Loading…
Reference in a new issue