summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/addrmap.c
diff options
context:
space:
mode:
author Oliver Stöneberg <oliverst@online.de>2014-10-23 11:19:39 +0200
committer Oliver Stöneberg <oliverst@online.de>2014-10-23 11:19:39 +0200
commit8ddb5bab468bfcb69ea00c27e4376813d966131c (patch)
tree55eeafb7ee96b7c8b266d26f0335372044551967 /src/emu/addrmap.c
parentf04db035c9ebeb71004ebcf69e13c10064bd95a3 (diff)
fixed signed integer overflow in address_map::uplift_submaps() - by O. Galibert (nw)
Diffstat (limited to 'src/emu/addrmap.c')
-rw-r--r--src/emu/addrmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emu/addrmap.c b/src/emu/addrmap.c
index 005e822e784..8e0ef0b1919 100644
--- a/src/emu/addrmap.c
+++ b/src/emu/addrmap.c
@@ -540,8 +540,8 @@ void address_map::uplift_submaps(running_machine &machine, device_t &device, dev
// Remap start and end
- int start_offset = subentry->m_addrstart / entry_bytes;
- int start_slot = start_offset % slot_count;
+ unsigned int start_offset = subentry->m_addrstart / entry_bytes;
+ unsigned int start_slot = start_offset % slot_count;
subentry->m_addrstart = entry->m_addrstart + (start_offset / slot_count) * databytes;
// Drop the entry if it ends up outside the range
@@ -551,8 +551,8 @@ void address_map::uplift_submaps(running_machine &machine, device_t &device, dev
continue;
}
- int end_offset = subentry->m_addrend / entry_bytes;
- int end_slot = end_offset % slot_count;
+ unsigned int end_offset = subentry->m_addrend / entry_bytes;
+ unsigned int end_slot = end_offset % slot_count;
subentry->m_addrend = entry->m_addrstart + (end_offset / slot_count) * databytes + databytes - 1;
// Clip the entry to the end of the range