diff options
-rw-r--r-- | src/kernel/window.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kernel/window.c b/src/kernel/window.c index 9d3db28..4d700bf 100644 --- a/src/kernel/window.c +++ b/src/kernel/window.c @@ -114,7 +114,7 @@ static void paint_and_above(const struct window *w) { for (uint16_t y = ys; y < ym; ++y) for (uint16_t x = xs; x < xm; ++x) - buffer[(y + i->ypos) * VBE_MODE_INFO->width + x + i->xpos] = i->pixel_buffer_pma[y * i->width + x]; + buffer[((y + i->ypos) & 0xffff) * VBE_MODE_INFO->width + ((x + i->xpos) & 0xffff)] = i->pixel_buffer_pma[y * i->width + x]; draw_hz_line(i->ypos - 2, i->xpos - 2, i->xpos + i->width + 2, BORDER_COLOR); draw_hz_line(i->ypos - 1, i->xpos - 2, i->xpos + i->width + 2, BORDER_COLOR); |