Fix 64bit problem when int != gsize to printf.

This commit is contained in:
James Antill 2014-07-16 00:45:13 -04:00
parent 3d85ab99dc
commit c88545d272

View File

@ -380,11 +380,14 @@ pkg_print (GFile *root, Header pkg,
{ {
gsize plen = strlen (nevra); gsize plen = strlen (nevra);
gsize rlen = strlen (from_repo) + 1; gsize rlen = strlen (from_repo) + 1;
int off = 0;
--align; // hacky ... for leading spaces. --align; // hacky ... for leading spaces.
off = align - (plen + rlen);
if (align > (plen + rlen)) if (align > (plen + rlen))
printf ("%s%*s@%s\n", nevra, align - (plen + rlen), "", from_repo); printf ("%s%*s@%s\n", nevra, off, "", from_repo);
else else
align = 0; align = 0;
} }