PPU: Fixed out-of-bounds memory writes
This commit is contained in:
parent
77ac5a50dc
commit
30cb4f1dcc
1 changed files with 1 additions and 1 deletions
|
@ -296,7 +296,7 @@ void Ppu::RenderScanline()
|
||||||
uint8_t row = (info.TileRow + rowOffset) & 0x0F;
|
uint8_t row = (info.TileRow + rowOffset) & 0x0F;
|
||||||
constexpr uint16_t bpp = 4;
|
constexpr uint16_t bpp = 4;
|
||||||
|
|
||||||
for(int x = info.X; x < info.X + width; x++) {
|
for(int x = info.X; x > 0 && x < info.X + width && x < 256; x++) {
|
||||||
if(_spritePixels[x] == 0xFFFF) {
|
if(_spritePixels[x] == 0xFFFF) {
|
||||||
uint8_t xOffset;
|
uint8_t xOffset;
|
||||||
int columnOffset;
|
int columnOffset;
|
||||||
|
|
Loading…
Add table
Reference in a new issue