diff options
Diffstat (limited to 'libgui/gui.c')
-rw-r--r-- | libgui/gui.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgui/gui.c b/libgui/gui.c index 3279ab0..50a6f62 100644 --- a/libgui/gui.c +++ b/libgui/gui.c @@ -130,7 +130,7 @@ void gui_win_on_win(struct window *dest, struct window *src, int x, int y) int bypp = dest->bpp >> 3; u8 *srcfb = src->fb; u8 *destfb = &dest->fb[x * bypp + y * dest->pitch]; - for (u32 cy = 0; cy < src->height; cy++) { + for (u32 cy = 0; cy < src->height && cy + y < dest->height; cy++) { for (u32 cx = 0; cx < src->width; cx++) { if (srcfb[bypp * cx + 3]) { destfb[bypp * cx + 0] = srcfb[bypp * cx + 0]; |