From 8ddb5bab468bfcb69ea00c27e4376813d966131c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Thu, 23 Oct 2014 11:19:39 +0200 Subject: [PATCH] fixed signed integer overflow in address_map::uplift_submaps() - by O. Galibert (nw) --- src/emu/addrmap.c | 8 ++++---- 1 file 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