Fixed bug in LargeFramebuffer#preparePacket(int,int,int) (#2213)

This commit is contained in:
ItsAnnie 2024-06-25 13:17:07 +01:00 committed by GitHub
parent 2b661fd48f
commit e513efb393
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,8 +33,8 @@ public interface LargeFramebuffer {
byte[] colors = new byte[Framebuffer.WIDTH * Framebuffer.WIDTH];
final int width = Math.min(width(), left + Framebuffer.WIDTH) - left;
final int height = Math.min(height(), top + Framebuffer.HEIGHT) - top;
for (int y = top; y < height; y++) {
for (int x = left; x < width; x++) {
for (int y = top; y < top+height; y++) {
for (int x = left; x < left+width; x++) {
final byte color = getMapColor(x, y);
colors[Framebuffer.index(x - left, y - top)] = color;
}