From: John Hodge Date: Wed, 12 Oct 2011 00:35:17 +0000 (+0800) Subject: Kernel/armv7 - Fixed edge case in __divmod64 X-Git-Tag: rel0.12~4 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=3587bb05dbc90a839b4a60ffc1ad702ee7013823;p=tpg%2Facess2.git Kernel/armv7 - Fixed edge case in __divmod64 --- diff --git a/Kernel/arch/armv7/lib.c b/Kernel/arch/armv7/lib.c index 94c1a3af..7e54afe4 100644 --- a/Kernel/arch/armv7/lib.c +++ b/Kernel/arch/armv7/lib.c @@ -133,7 +133,7 @@ Uint64 __divmod64(Uint64 Num, Uint64 Den, Uint64 *Rem) add >>= 1; Den >>= 1; // If the numerator is > Den, subtract and add to return value - if( Num > Den ) + if( Num >= Den ) { ret += add; Num -= Den;