attache: hopefully fix out of bounds array access (no whatsnew)

This commit is contained in:
mahlemiut 2014-02-27 10:18:07 +00:00
parent 162786d4d4
commit eba029c175

View File

@ -242,9 +242,9 @@ UINT32 attache_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
// Graphics output (if enabled)
if(m_gfx_enabled)
{
for(y=0;y<bitmap.height()/10;y++)
for(y=0;y<(bitmap.height()-1)/10;y++)
{
for(x=0;x<bitmap.width()/8;x++)
for(x=0;x<(bitmap.width()-1)/8;x++)
{
// graphics pixels use half the clock of text, so 4 graphics pixels per character
for(scan=0;scan<10;scan+=2)
@ -274,9 +274,9 @@ UINT32 attache_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
bitmap.fill(0);
// Text output
for(y=0;y<bitmap.height()/10;y++) // lines
for(y=0;y<(bitmap.height()-1)/10;y++) // lines
{
for(x=0;x<bitmap.width()/8;x++) // columns
for(x=0;x<(bitmap.width()-1)/8;x++) // columns
{
UINT8 ch = m_char_ram[(y*128)+x];
if(m_attr_ram[(y*128)+x] & 0x10) // double-size