Merge pull request #6203 from Cacodemon345/patch-241374
SVGA: Fix overflow crashes in certain cases
This commit is contained in:
@@ -155,7 +155,7 @@ svga_render_text_40(svga_t *svga)
|
||||
svga->lastline_draw = svga->displine;
|
||||
|
||||
if (svga->fullchange) {
|
||||
p = &svga->monitor->target_buffer->line[svga->displine + svga->y_add][svga->x_add];
|
||||
p = &svga->monitor->target_buffer->line[(svga->displine + svga->y_add) & 2047][(svga->x_add) & 2047];
|
||||
xinc = (svga->seqregs[1] & 1) ? 16 : 18;
|
||||
|
||||
for (int x = 0; x < (svga->hdisp + svga->scrollcache); x += xinc) {
|
||||
@@ -238,7 +238,7 @@ svga_render_text_80(svga_t *svga)
|
||||
svga->lastline_draw = svga->displine;
|
||||
|
||||
if (svga->fullchange) {
|
||||
p = &svga->monitor->target_buffer->line[svga->displine + svga->y_add][svga->x_add];
|
||||
p = &svga->monitor->target_buffer->line[(svga->displine + svga->y_add) & 2047][(svga->x_add) & 2047];
|
||||
xinc = (svga->seqregs[1] & 1) ? 8 : 9;
|
||||
|
||||
static uint32_t col = 0x00000000;
|
||||
|
||||
Reference in New Issue
Block a user