From 0ff95a565280241a4b9cc03840d8756180860b25 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 13 Sep 2020 12:10:45 +0200 Subject: Maaany wm features --- libgui/gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgui/gui.c') diff --git a/libgui/gui.c b/libgui/gui.c index d973835..486fe8e 100644 --- a/libgui/gui.c +++ b/libgui/gui.c @@ -74,7 +74,7 @@ void gui_load_image(struct window *win, char *path, int x, int y) // TODO: Support padding with odd widths int bypp = bmp->bpp >> 3; - u8 *srcfb = &bmp->data[bypp + bmp->height * bmp->pitch]; + u8 *srcfb = &bmp->data[bypp + (bmp->height - 1) * bmp->pitch]; u8 *destfb = &win->fb[bypp]; for (u32 cy = 0; cy < bmp->height; cy++) { memcpy(destfb, srcfb, bmp->pitch); -- cgit v1.2.3