From 3587bb05dbc90a839b4a60ffc1ad702ee7013823 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Wed, 12 Oct 2011 08:35:17 +0800 Subject: [PATCH] Kernel/armv7 - Fixed edge case in __divmod64 --- Kernel/arch/armv7/lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1