mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-03 06:30:33 +00:00
Avoid overflowing when rerendering character.
This commit is contained in:
parent
e6ec58a8ba
commit
31cef9eb58
@ -174,7 +174,7 @@ static void _rerender_character(int col, int row, uint8_t *fb) {
|
||||
|
||||
// re-generate texture RGBA_8888 from indexed color
|
||||
const unsigned int colCount = 1;
|
||||
const unsigned int pixCharsWidth = (FONT80_WIDTH_PIXELS+1)*colCount;
|
||||
const unsigned int pixCharsWidth = FONT80_WIDTH_PIXELS*colCount;
|
||||
const unsigned int rowStride = hudKeyboard->pixWidth - pixCharsWidth;
|
||||
unsigned int srcIndex = (row * hudKeyboard->pixWidth * FONT_HEIGHT_PIXELS) + (col * FONT80_WIDTH_PIXELS);
|
||||
unsigned int dstIndex = srcIndex * 4;
|
||||
|
Loading…
Reference in New Issue
Block a user