diff --git a/engine/math/math.asm b/engine/math/math.asm index 18aa042ed..f06b5488a 100644 --- a/engine/math/math.asm +++ b/engine/math/math.asm @@ -172,18 +172,18 @@ _Divide:: .done ldh a, [hDividend + 1] - ldh [hDivisor], a + ldh [hRemainder], a ldh a, [hMathBuffer + 4] - ldh [hDividend + 3], a + ldh [hQuotient + 2], a ldh a, [hMathBuffer + 3] - ldh [hDividend + 2], a + ldh [hQuotient + 1], a ldh a, [hMathBuffer + 2] - ldh [hDividend + 1], a + ldh [hQuotient + 0], a ldh a, [hMathBuffer + 1] - ldh [hDividend + 0], a + ldh [hQuotient - 1], a ret