]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/demo_panels.c
ncurses 6.1 - patch 20190831
[ncurses.git] / test / demo_panels.c
index c47f52f242d84d6f77b731b06129801d657d7d1f..e4c9a7d61eb5e5c1168f70922d8370c0405c322c 100644 (file)
@@ -204,7 +204,7 @@ mkpanel(short color, int rows, int cols, int tly, int tlx)
 {
     WINDOW *win;
     PANEL *pan = 0;
-    char *userdata = typeMalloc(char, 5);
+    char *userdata = typeMalloc(char, 6);
 
     if ((win = newwin(rows, cols, tly, tlx)) != 0) {
        keypad(win, TRUE);
@@ -222,7 +222,7 @@ mkpanel(short color, int rows, int cols, int tly, int tlx)
            wbkgdset(win, A_BOLD | ' ');
        }
     }
-    _nc_SPRINTF(userdata, _nc_SLIMIT(3) "p%d", color % 8);
+    _nc_SPRINTF(userdata, _nc_SLIMIT(4) "p%d", color % 8);
     set_panel_userptr(pan, (NCURSES_CONST void *) userdata);
     return pan;
 }