mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
homelab: fix array OOB crash
This commit is contained in:
parent
81362b5700
commit
878081bcba
@ -251,10 +251,10 @@ u8 homelab2_state::memE000_r(offs_t offset)
|
||||
u8 gfx;
|
||||
if (m_screenshadow_is_text_mode)
|
||||
{
|
||||
const int vramRelIndex0 = offset % 0x400; // Character address in video ram First character in 0x001
|
||||
const int row8_index0 = (offset - 1) / 0x400; // Row index in char [0-7]
|
||||
u8 const chr = m_vram[vramRelIndex0]; // get char in videoram
|
||||
gfx = m_p_chargen[chr | (row8_index0 << 8)]; // get dot pattern in chargen
|
||||
const int vramRelIndex0 = offset & 0x3ff; // Character address in video ram First character in 0x001
|
||||
const int row8_index0 = ((offset - 1) & 0x1c00) >> 10; // Row index in char [0-7]
|
||||
u8 const chr = m_vram[vramRelIndex0]; // get char in videoram
|
||||
gfx = m_p_chargen[chr | (row8_index0 << 8)]; // get dot pattern in chargen
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user