summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Andrew Gardner <andrew-gardner@users.noreply.github.com>2014-10-18 17:44:25 +0000
committer Andrew Gardner <andrew-gardner@users.noreply.github.com>2014-10-18 17:44:25 +0000
commit8b906aa0ec3b0e2e8f69f3c9d862027286173272 (patch)
treeb68cb5c6f2485af044a7b15639f82c6a2b94fa51
parentbebe879e855223db7002427123ed73808f8d6b37 (diff)
Fix potential overrun when adding a size_t to a UINT16. (nw)
-rw-r--r--src/emu/cpu/dsp56k/dsp56ops.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/cpu/dsp56k/dsp56ops.inc b/src/emu/cpu/dsp56k/dsp56ops.inc
index 0a35ec19c55..e68ff70a26f 100644
--- a/src/emu/cpu/dsp56k/dsp56ops.inc
+++ b/src/emu/cpu/dsp56k/dsp56ops.inc
@@ -606,7 +606,7 @@ static void execute_one(dsp56k_core* cpustate)
/* Drop out if you've already completed your work. */
if (size != 0x1337)
{
- PC += size;
+ PC += (UINT16)size;
dsp56k_process_loop(cpustate);
dsp56k_process_rep(cpustate, size);
@@ -1091,7 +1091,7 @@ static void execute_one(dsp56k_core* cpustate)
}
/* Must have been a good opcode */
- PC += size;
+ PC += (UINT16)size;
dsp56k_process_loop(cpustate);
dsp56k_process_rep(cpustate, size);