1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-21 02:17:08 +00:00

Eliminate out-of-bounds risk.

This commit is contained in:
Thomas Harte
2026-02-19 09:51:28 -05:00
parent 6df2ee1427
commit fafae46fac
+3 -3
View File
@@ -284,10 +284,10 @@ private:
sprite.image[2] = colour;
sprite.x -= sprite.early_clock();
const AddressT graphic_location = base->sprite_generator_table_address_ & bits<11>(AddressT((name << 3) | sprite.row));
const AddressT graphic_location =
base->sprite_generator_table_address_ & bits<11>(AddressT((name << 3) | sprite.row));
sprite.image[0] = base->ram_[graphic_location];
sprite.image[1] = base->ram_[graphic_location+16]; // TODO: occasional out-of-bounds accesses here. Check
// uninitialised Master System.
sprite.image[1] = base->ram_[graphic_location | 16];
if constexpr (SpriteBuffer::test_is_filling) {
if(slot == ((mode == SpriteMode::Mode2) ? 7 : 3)) {