1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-21 21:33:54 +00:00

Avoid potential out-of-bounds read.

This commit is contained in:
Thomas Harte 2023-12-02 13:23:48 -05:00
parent 0bae14be8f
commit 6c10611150
2 changed files with 2 additions and 1 deletions

View File

@ -196,6 +196,7 @@ void Nick::run_for(Cycles duration) {
reload_line_parameter_pointer_ = ram_[line_parameter_pointer_ + 1] & 0x01;
break;
// TODO: is this interpreted live, or locked in here? Consider mid-line changes.
// Second slot: margins and ALT/IND bits.
case 1:
// Determine the margins.

View File

@ -75,7 +75,7 @@ class Nick {
uint8_t lines_remaining_ = 0x00;
uint8_t two_colour_mask_ = 0xff;
int left_margin_ = 0, right_margin_ = 0;
const uint16_t *alt_ind_palettes[4];
const uint16_t *alt_ind_palettes[4] = {palette_, palette_, palette_, palette_};
enum class Mode {
Vsync,
Pixel,