* kern/misc.c (grub_ltoa): Fix cast when handling negative

values.  Noticed by Pavel Roskin.
This commit is contained in:
davem 2009-04-12 08:06:26 +00:00
parent 5b5d4aa5f0
commit 56bc2471ad
2 changed files with 6 additions and 1 deletions

View file

@ -598,7 +598,7 @@ grub_ltoa (char *str, int c, unsigned long n)
if ((long) n < 0 && c == 'd')
{
n = (unsigned) (-((long) n));
n = (unsigned long) (-((long) n));
*str++ = '-';
}