changeset 109792:96094f59e6e2

* keyboard.c (parse_tool_bar_item): Put in a bad label if :label isn't a string.
author Jan D <jan.h.d@swipnet.se>
date Sun, 15 Aug 2010 15:18:14 +0200
parents af075a74e694
children fe9b13a5f44f 76debf804cdd
files src/ChangeLog src/keyboard.c
diffstat 2 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sun Aug 15 11:30:06 2010 +0200
+++ b/src/ChangeLog	Sun Aug 15 15:18:14 2010 +0200
@@ -1,3 +1,8 @@
+2010-08-15  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* keyboard.c (parse_tool_bar_item): Put in a bad label if :label
+	isn't a string.
+
 2010-08-15  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* keyboard.c (parse_tool_bar_item): Avoid excessive use of strlen.
--- a/src/keyboard.c	Sun Aug 15 11:30:06 2010 +0200
+++ b/src/keyboard.c	Sun Aug 15 15:18:14 2010 +0200
@@ -8285,12 +8285,15 @@
 	    return 0;
 	}
       else if (EQ (key, QChelp))
-	/* `:help HELP-STRING'.  */
-	PROP (TOOL_BAR_ITEM_HELP) = value;
+        /* `:help HELP-STRING'.  */
+        PROP (TOOL_BAR_ITEM_HELP) = value;
       else if (EQ (key, QClabel))
         {
+          const char *bad_label = "!!?GARBLED ITEM?!!";
           /* `:label LABEL-STRING'.  */
-          PROP (TOOL_BAR_ITEM_LABEL) = value;
+          PROP (TOOL_BAR_ITEM_HELP) = STRINGP (value)
+            ? value
+            : make_string (bad_label, strlen (bad_label));
           have_label = 1;
         }
       else if (EQ (key, QCfilter))