aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-08-24 20:27:52 +0200
committerGitHub <noreply@github.com>2019-08-24 20:27:52 +0200
commit16d5041da87f85022de3f9f44693c2b4ea54234e (patch)
tree77826c64776d51de618eb2514762df2e1de433ed
parent626a9c13859b556a19abbf2212233a834e11f022 (diff)
parent6c7c037b202ca0e145a47a9d8dfbf34bc8cdda7d (diff)
Merge pull request #508 from xperia64/master
Fix division edge case
-rw-r--r--src/NDS.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/NDS.cpp b/src/NDS.cpp
index 991995d..ceeeb79 100644
--- a/src/NDS.cpp
+++ b/src/NDS.cpp
@@ -1416,7 +1416,7 @@ void DivDone(u32 param)
if (den == 0)
{
DivQuotient[0] = (num<0) ? 1:-1;
- DivQuotient[1] = (num<0) ? -1:1;
+ DivQuotient[1] = (num<0) ? -1:0;
*(s64*)&DivRemainder[0] = num;
}
else if (num == -0x80000000 && den == -1)