libroot: Fix possible typo in printf_size.c

It appears as if there is a typo in printf_size.c; it makes
no sense to compare an unitialized variable in such a way.
Since `info->width` is referenced later on in the variable
assignment, it seems possible that the intended statement
was to place the larger of the values between `info->width`
and `info->prec` into `width`.

Fixes CID 609431.

korli: Patch applied in cddfcf2f87
was incomplete. This patch completes with what upstream did in 2004:
fa5753eede.patch

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
ohnx 2018-01-03 17:10:10 +00:00 committed by Jérôme Duval
parent 36ef138ce5
commit 7766c048b3

View File

@ -183,7 +183,7 @@ printf_size (FILE *fp, const struct printf_info *info, const void *const *args)
if (special)
{
int width = info->prec > width ? info->prec : info->width;
int width = info->prec > info->width ? info->prec : info->width;
if (negative || info->showsign || info->space)
--width;