notaz.gp2x.de
/
gpsp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d40aa46
)
handle div by 0
author
notaz
<notaz@pixelinis>
Wed, 7 Sep 2011 22:39:47 +0000
(
01:39
+0300)
committer
notaz
<notaz@pixelinis>
Wed, 7 Sep 2011 22:39:47 +0000
(
01:39
+0300)
arm/arm_emit.h
patch
|
blob
|
blame
|
history
diff --git
a/arm/arm_emit.h
b/arm/arm_emit.h
index
a270a24
..
a770063
100644
(file)
--- a/
arm/arm_emit.h
+++ b/
arm/arm_emit.h
@@
-1931,6
+1931,9
@@
void execute_swi_hle_div_thumb();
void execute_swi_hle_div_c()
{
+ if (reg[1] == 0)
+ // real BIOS supposedly locks up, but game can recover on interrupt
+ return;
s32 result = (s32)reg[0] / (s32)reg[1];
reg[1] = (s32)reg[0] % (s32)reg[1];
reg[0] = result;