- Fix modulo bug.

Reminded by:	bde
This commit is contained in:
Nate Williams 1998-12-01 05:29:06 +00:00
parent 79a07699e7
commit 09ede38dc4

View File

@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: moddi3.c,v 1.5 1997/02/22 09:39:56 peter Exp $
*/
#include <libkern/quad.h>
@ -57,7 +57,7 @@ __moddi3(a, b)
else
ua = a, neg = 0;
if (b < 0)
ub = -(u_quad_t)b, neg ^= 1;
ub = -(u_quad_t)b;
else
ub = b;
(void)__qdivrem(ua, ub, &ur);