From: Vladimir Serbinenko Date: Tue, 12 Nov 2013 23:51:06 +0000 (+0100) Subject: * grub-core/term/tparm.c (tparam_internal): Use unsigned divisions. X-Git-Tag: grub-2.02-beta1~364 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f649a6a8fd08a6bae525c88a5db909ece9bb466f;p=thirdparty%2Fgrub.git * grub-core/term/tparm.c (tparam_internal): Use unsigned divisions. --- diff --git a/ChangeLog b/ChangeLog index 6ad820046..6f283eb01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-11-12 Vladimir Serbinenko + + * grub-core/term/tparm.c (tparam_internal): Use unsigned divisions. + 2013-11-12 Vladimir Serbinenko Add missing includes of loader.h. diff --git a/grub-core/term/tparm.c b/grub-core/term/tparm.c index 8c1c288a0..fce7dd479 100644 --- a/grub-core/term/tparm.c +++ b/grub-core/term/tparm.c @@ -614,13 +614,15 @@ tparam_internal(const char *string, va_list ap) case '/': y = npop(); x = npop(); - npush(y ? (x / y) : 0); + /* GRUB has no signed divisions. */ + npush(y ? ((unsigned)x / (unsigned)y) : 0); break; case 'm': y = npop(); x = npop(); - npush(y ? (x % y) : 0); + /* GRUB has no signed divisions. */ + npush(y ? ((unsigned)x % (unsigned)y) : 0); break; case 'A':