libluna: Treat a negative precision as if precision was omitted
This commit is contained in:
parent
38541e22e9
commit
e098a3269a
@ -139,7 +139,10 @@ static usize parse_precision(const char** format, flags_t& flags, va_list ap)
|
|||||||
const int precision = va_arg(ap, int);
|
const int precision = va_arg(ap, int);
|
||||||
if (precision >= 0) result = (usize)precision;
|
if (precision >= 0) result = (usize)precision;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
result = 0;
|
result = 0;
|
||||||
|
flags &= ~FLAG_USE_PRECISION;
|
||||||
|
}
|
||||||
(*format)++;
|
(*format)++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user