handle div by 0
This commit is contained in:
parent
d40aa461c5
commit
804e743b41
|
@ -1931,6 +1931,9 @@ void execute_swi_hle_div_thumb();
|
||||||
|
|
||||||
void execute_swi_hle_div_c()
|
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];
|
s32 result = (s32)reg[0] / (s32)reg[1];
|
||||||
reg[1] = (s32)reg[0] % (s32)reg[1];
|
reg[1] = (s32)reg[0] % (s32)reg[1];
|
||||||
reg[0] = result;
|
reg[0] = result;
|
||||||
|
|
Loading…
Reference in New Issue