]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/demo_panels.c
ncurses 6.1 - patch 20190928
[ncurses.git] / test / demo_panels.c
index c47f52f242d84d6f77b731b06129801d657d7d1f..ac3b4318601151f482c856c71743bcb896eb15c1 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: demo_panels.c,v 1.43 2019/08/24 23:11:01 tom Exp $
+ * $Id: demo_panels.c,v 1.44 2019/08/31 23:24:11 tom Exp $
  *
  * Demonstrate a variety of functions from the panel library.
  */
@@ -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;
 }