summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2019-07-30 14:53:16 +0200
committer hap <happppp@users.noreply.github.com>2019-07-30 14:53:29 +0200
commitcc52efc0958102124bfb965e5ba493153847f469 (patch)
treeae41d7a1abee61e572b6cb3c1a863b84ad684b12
parent0cea4a036abb18296fa79288e3d9b2ab3994c496 (diff)
fix MT 7382, 32bit overflow in some debug commands (nw)
-rw-r--r--src/emu/debug/debugcmd.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index fdf08ca0ca4..9ef8b5bcbb3 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -1849,7 +1849,7 @@ void debugger_commands::execute_save(int ref, const std::vector<std::string> &pa
switch (space->addr_shift())
{
case -3:
- for (offs_t i = offset; i != endoffset; i++)
+ for (u64 i = offset; i != endoffset; i++)
{
offs_t curaddr = i;
u64 data = space->device().memory().translate(space->spacenum(), TRANSLATE_READ_DEBUG, curaddr) ?
@@ -1858,7 +1858,7 @@ void debugger_commands::execute_save(int ref, const std::vector<std::string> &pa
}
break;
case -2:
- for (offs_t i = offset; i != endoffset; i++)
+ for (u64 i = offset; i != endoffset; i++)
{
offs_t curaddr = i;
u32 data = space->device().memory().translate(space->spacenum(), TRANSLATE_READ_DEBUG, curaddr) ?
@@ -1867,7 +1867,7 @@ void debugger_commands::execute_save(int ref, const std::vector<std::string> &pa
}
break;
case -1:
- for (offs_t i = offset; i != endoffset; i++)
+ for (u64 i = offset; i != endoffset; i++)
{
offs_t curaddr = i;
u16 data = space->device().memory().translate(space->spacenum(), TRANSLATE_READ_DEBUG, curaddr) ?
@@ -1876,7 +1876,7 @@ void debugger_commands::execute_save(int ref, const std::vector<std::string> &pa
}
break;
case 0:
- for (offs_t i = offset; i != endoffset; i++)
+ for (u64 i = offset; i != endoffset; i++)
{
offs_t curaddr = i;
u8 data = space->device().memory().translate(space->spacenum(), TRANSLATE_READ_DEBUG, curaddr) ?
@@ -1887,7 +1887,7 @@ void debugger_commands::execute_save(int ref, const std::vector<std::string> &pa
case 3:
offset &= ~15;
endoffset &= ~15;
- for (offs_t i = offset; i != endoffset; i+=16)
+ for (u64 i = offset; i != endoffset; i+=16)
{
offs_t curaddr = i;
u16 data = space->device().memory().translate(space->spacenum(), TRANSLATE_READ_DEBUG, curaddr) ?
@@ -1944,7 +1944,7 @@ void debugger_commands::execute_load(int ref, const std::vector<std::string> &pa
// determine the addresses to read
endoffset = (offset + length - 1) & space->addrmask();
offset = offset & space->addrmask();
- offs_t i = 0;
+ u64 i = 0;
// now read the data in, ignore endoffset and load entire file if length has been set to zero (offset-1)
switch (space->addr_shift())
{
@@ -2089,7 +2089,7 @@ void debugger_commands::execute_dump(int ref, const std::vector<std::string> &pa
auto dis = space->device().machine().disable_side_effects();
bool be = space->endianness() == ENDIANNESS_BIG;
- for (offs_t i = offset; i <= endoffset; i += rowsize)
+ for (u64 i = offset; i <= endoffset; i += rowsize)
{
output.clear();
output.rdbuf()->clear();