]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - c++/cursslk.cc
ncurses 6.3 - patch 20220716
[ncurses.git] / c++ / cursslk.cc
index 9922163cd360692192e09dcf121f7ba9b852cf0a..b0dd4ab0dc987294279a97c5f530938327339700 100644 (file)
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright 2019,2020 Thomas E. Dickey                                     *
+ * Copyright 2019-2020,2022 Thomas E. Dickey                                *
  * Copyright 1998-2005,2012 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -36,7 +36,7 @@
 #include "cursslk.h"
 #include "cursesapp.h"
 
-MODULE_ID("$Id: cursslk.cc,v 1.19 2020/07/18 19:57:11 anonymous.maarten Exp $")
+MODULE_ID("$Id: cursslk.cc,v 1.20 2022/02/26 17:57:23 tom Exp $")
 
 Soft_Label_Key_Set::Soft_Label_Key&
   Soft_Label_Key_Set::Soft_Label_Key::operator=(char *text)
@@ -56,6 +56,8 @@ Soft_Label_Key_Set::Label_Layout
 
 void Soft_Label_Key_Set::init()
 {
+  if (num_labels > 12)
+      num_labels = 12;
   slk_array = new Soft_Label_Key[num_labels];
   for(int i=0; i < num_labels; i++) {
     slk_array[i].num = i+1;