Avoid unpredictable behavior in error condition.

This commit is contained in:
Unknown W. Brackets committed 2015-04-08 11:57:57 -07:00
1 parent 5285f977e4
commit fc0788bc95
2 files changed
+8

No files matched your search

+7
View File
@@ -390,7 +390,10 @@ namespace MIPSInt
else if (type == 7)
f[0] = Float16ToFloat32((u16)uimm16); // vfim
else
{
_dbg_assert_msg_(CPU,0,"Trying to interpret instruction that can't be interpreted");
f[0] = 0;
}
ApplyPrefixD(f, V_Single);
V(vt) = f[0];
@@ -735,6 +738,8 @@ namespace MIPSInt
break;
default:
_dbg_assert_msg_(CPU, 0, "Trying to interpret Int_Vf2h instruction that can't be interpreted");
d[0] = 0;
d[1] = 0;
break;
}
ApplyPrefixD(reinterpret_cast<float *>(d), outsize);
@@ -1789,6 +1794,8 @@ bad:
default:
Reporting::ReportMessage("CrossQuat instruction with wrong size");
_dbg_assert_msg_(CPU,0,"Trying to interpret instruction that can't be interpreted");
d[0] = 0;
d[1] = 0;
break;
}
WriteVector(d, sz, vd);
+1
View File
@@ -293,6 +293,7 @@ void CtrlRegisterList::onPaint(WPARAM wParam, LPARAM lParam)
break;
default:
temp[0] = '\0';
len = 0;
break;
}