mirror of https://github.com/stella-emu/stella.git
Fix narrowing issue.
This commit is contained in:
parent
f397dd024a
commit
8f1f94e80a
|
@ -51,7 +51,7 @@ namespace {
|
||||||
inline uInt32 READ32(const uInt8* data, uInt32 addr) {
|
inline uInt32 READ32(const uInt8* data, uInt32 addr) {
|
||||||
return (reinterpret_cast<const uInt32*>(data))[addr >> 2];
|
return (reinterpret_cast<const uInt32*>(data))[addr >> 2];
|
||||||
}
|
}
|
||||||
inline uInt16 READ16(const uInt8* data, uInt16 addr) {
|
inline uInt16 READ16(const uInt8* data, uInt32 addr) {
|
||||||
return (reinterpret_cast<const uInt16*>(data))[addr >> 1];
|
return (reinterpret_cast<const uInt16*>(data))[addr >> 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -690,7 +690,7 @@ void CortexM0::recompileCodeRegions()
|
||||||
if (!std::holds_alternative<MemoryRegionAccessCode>(region.access))
|
if (!std::holds_alternative<MemoryRegionAccessCode>(region.access))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (size_t i = 0; i < region.size; i += 2)
|
for (uInt32 i = 0; i < region.size; i += 2)
|
||||||
std::get<1>(region.access).ops[i >> 1] =
|
std::get<1>(region.access).ops[i >> 1] =
|
||||||
decodeInstructionWord(READ16(std::get<1>(region.access).backingStore, i));
|
decodeInstructionWord(READ16(std::get<1>(region.access).backingStore, i));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue