Skip to content

Commit 35f8346

Browse files
committed
fix hopper bug in simulator
1 parent 2135977 commit 35f8346

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Hopper/src/game.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ static void fillPatternedRect(int16_t x, int16_t y, uint8_t w, int8_t h, const u
590590
for (uchar *p = arduboy.getBuffer() + x + (y / 8) * WIDTH; h > 0; h -= 8, p += WIDTH - w) {
591591
if (h < 8) d &= 0xFF >> (8 - h);
592592
for (uint8_t i = w; i > 0; i--, p++) {
593-
*p = *p & ~d | pgm_read_byte(ptn + (int) p % 4) & d;
593+
*p = *p & ~d | pgm_read_byte(ptn + ((uintptr_t) p % 4)) & d;
594594
}
595595
d = 0xFF;
596596
}

0 commit comments

Comments
 (0)