Closed ghost closed 4 years ago
Hi, there appears to be a global buffer overflow caused by line 187 here:
https://github.com/AndreaOrru/LaiNES/blob/52b7920d9878962adf50fdeb14f3e65906db57d9/src/ppu.cpp#L181-L187
Because n is allowed to be 8, the next loop iteration where n == 8 overflows the secOam buffer because it can only hold 8 elements.
n
n == 8
secOam
Haven't looked at this code in a while - it looks like you're right though. Have you already tried compiling it with ++n >= 8?
++n >= 8
Yes the error seems to go away with that.
Closed by #37
Hi, there appears to be a global buffer overflow caused by line 187 here:
https://github.com/AndreaOrru/LaiNES/blob/52b7920d9878962adf50fdeb14f3e65906db57d9/src/ppu.cpp#L181-L187
Because
n
is allowed to be 8, the next loop iteration wheren == 8
overflows thesecOam
buffer because it can only hold 8 elements.