diff --git a/src/Sprites.cpp b/src/Sprites.cpp index 979ef95..233462a 100644 --- a/src/Sprites.cpp +++ b/src/Sprites.cpp @@ -131,7 +131,7 @@ void Sprites::drawBitmap(int16_t x, int16_t y, const uint8_t ofs_step = draw_mode == SPRITE_PLUS_MASK ? 2 : 1; const uint8_t ofs_stride = (w - rendered_width)*ofs_step; - const uint8_t initial_bofs = ((start_h * w) + xOffset)*ofs_step; + const uint16_t initial_bofs = ((start_h * w) + xOffset)*ofs_step; const uint8_t *bofs = bitmap + initial_bofs; const uint8_t *mask_ofs = !mask ? bitmap : mask;