From: notaz Date: Sun, 28 Jan 2018 17:57:57 +0000 (+0200) Subject: fix some pointer arithmetic X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8cd6a082bb9c228397a0436f28818b74d8e9636;p=libpicofe.git fix some pointer arithmetic --- diff --git a/menu.c b/menu.c index bf5c864..3f9cdec 100644 --- a/menu.c +++ b/menu.c @@ -429,12 +429,12 @@ static void menu_draw_begin(int need_bg, int no_borders) if (g_border_style && no_borders) { for (y = 0; y < g_menuscreen_h; y++) menu_darken_bg((short *)g_menuscreen_ptr + g_menuscreen_pp * y, - g_menubg_ptr + g_menuscreen_w * y, g_menuscreen_w, 1); + (short *)g_menubg_ptr + g_menuscreen_w * y, g_menuscreen_w, 1); } else { for (y = 0; y < g_menuscreen_h; y++) memcpy((short *)g_menuscreen_ptr + g_menuscreen_pp * y, - g_menubg_ptr + g_menuscreen_w * y, g_menuscreen_w * 2); + (short *)g_menubg_ptr + g_menuscreen_w * y, g_menuscreen_w * 2); } } }