From 80b1d885d1e4ff338cadf0e5c210ad87d7b9fdac Mon Sep 17 00:00:00 2001 From: "SND\\shalma_cp" Date: Fri, 5 Nov 2010 01:30:41 +0000 Subject: Threads of Fate - psxinterpreter.c - divide by zero handling - fixes Rue's quest house bug - only works with interpreter git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@59193 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- libpcsxcore/psxinterpreter.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libpcsxcore') diff --git a/libpcsxcore/psxinterpreter.c b/libpcsxcore/psxinterpreter.c index e4e02248..633a307b 100644 --- a/libpcsxcore/psxinterpreter.c +++ b/libpcsxcore/psxinterpreter.c @@ -468,6 +468,10 @@ void psxDIV() { _i32(_rLo_) = _i32(_rRs_) / _i32(_rRt_); _i32(_rHi_) = _i32(_rRs_) % _i32(_rRt_); } + else { + _i32(_rLo_) = 0xffffffff; + _i32(_rHi_) = _i32(_rRs_); + } } void psxDIVU() { @@ -475,6 +479,10 @@ void psxDIVU() { _rLo_ = _rRs_ / _rRt_; _rHi_ = _rRs_ % _rRt_; } + else { + _rLo_ = 0xffffffff; + _rHi_ = _rRs_; + } } void psxMULT() { -- cgit v1.2.3