From 92d1c8f83dc30806dcd9d27e613d66f386a4f8a1 Mon Sep 17 00:00:00 2001 From: smf- Date: Sat, 29 Nov 2008 00:18:10 +0000 Subject: [PATCH] fixed memory corruption bug. --- src/mame/drivers/deshoros.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mame/drivers/deshoros.c b/src/mame/drivers/deshoros.c index 64703d93003..37c06df1a03 100644 --- a/src/mame/drivers/deshoros.c +++ b/src/mame/drivers/deshoros.c @@ -22,8 +22,9 @@ static char led_array[21]; VIDEO_START( deshoros ) { static UINT8 i; - for(i=0;i<32;i++) + for(i=0;i<20;i++) led_array[i] = 0x20; + led_array[20] = 0; } VIDEO_UPDATE( deshoros ) @@ -36,11 +37,11 @@ VIDEO_UPDATE( deshoros ) static void update_led_array(UINT8 new_data) { static UINT8 i; - /*update the data*/ - led_array[20] = new_data; /*scroll the data*/ - for(i=0;i<21;i++) + for(i=0;i<19;i++) led_array[i] = led_array[i+1]; + /*update the data*/ + led_array[19] = new_data; } static UINT8 bank;