aboutsummaryrefslogtreecommitdiff
path: root/libgui/gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgui/gui.c')
-rw-r--r--libgui/gui.c2
1 files changed, 1 insertions, 1 deletions
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);