From eb677b3d5a82bb13d06bf09b1f1e68c8bd6bf3c4 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 19 Jun 2023 00:11:03 +0200 Subject: [PATCH] Fixed array out of bound accesses in video/vid_herculesplus.c. --- src/video/vid_herculesplus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/vid_herculesplus.c b/src/video/vid_herculesplus.c index 95d38f1c3..a5422fbc1 100644 --- a/src/video/vid_herculesplus.c +++ b/src/video/vid_herculesplus.c @@ -327,7 +327,7 @@ draw_char_ram4(herculesplus_t *dev, int x, uint8_t chr, uint8_t attr) if ((attr & 0x77) == 0) cfg = ibg; /* 'blank' attribute */ - buffer32->line[dev->displine][x * cw + i] = dev->cols[attr][blink][cfg]; + buffer32->line[dev->displine][x * cw + i] = dev->cols[attr][!!blink][cfg]; val = val << 1; } } @@ -423,7 +423,7 @@ draw_char_ram48(herculesplus_t *dev, int x, uint8_t chr, uint8_t attr) else cfg |= ibg; - buffer32->line[dev->displine][(x * cw) + i] = dev->cols[attr][blink][cfg]; + buffer32->line[dev->displine][(x * cw) + i] = dev->cols[attr][!!blink][cfg]; val = val << 1; } }