fix some pointer arithmetic
authornotaz <notasas@gmail.com>
Sun, 28 Jan 2018 17:57:57 +0000 (19:57 +0200)
committernotaz <notasas@gmail.com>
Sun, 28 Jan 2018 17:58:52 +0000 (19:58 +0200)
menu.c

diff --git a/menu.c b/menu.c
index bf5c864..3f9cdec 100644 (file)
--- 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) {\r
                        for (y = 0; y < g_menuscreen_h; y++)\r
                                menu_darken_bg((short *)g_menuscreen_ptr + g_menuscreen_pp * y,\r
-                                       g_menubg_ptr + g_menuscreen_w * y, g_menuscreen_w, 1);\r
+                                       (short *)g_menubg_ptr + g_menuscreen_w * y, g_menuscreen_w, 1);\r
                }\r
                else {\r
                        for (y = 0; y < g_menuscreen_h; y++)\r
                                memcpy((short *)g_menuscreen_ptr + g_menuscreen_pp * y,\r
-                                       g_menubg_ptr + g_menuscreen_w * y, g_menuscreen_w * 2);\r
+                                       (short *)g_menubg_ptr + g_menuscreen_w * y, g_menuscreen_w * 2);\r
                }\r
        }\r
 }\r