1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-02 20:30:00 +00:00

Avoid out-of-bounds access of double_bytes.

This commit is contained in:
Thomas Harte 2020-11-24 09:38:07 -05:00 committed by GitHub
parent 9a819d6ca0
commit 098a22aa95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -627,7 +627,7 @@ uint16_t *VideoBase::output_high_resolution(uint16_t *target, int start, int end
const uint16_t row_address = get_row_address(row);
for(int c = start; c < end; c++) {
uint8_t source = ram_[row_address + c];
const uint32_t doubled_source = uint32_t(double_bytes[source]);
const uint32_t doubled_source = uint32_t(double_bytes[source & 0x7f]);
// Just append new bits, doubled up (and possibly delayed).
// TODO: I can kill the conditional here. Probably?