aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-05-24 22:58:54 +0000
committerRichard M. Stallman1993-05-24 22:58:54 +0000
commitd1f504609f9e56343a0375d25965d3f718b40eef (patch)
tree99dc7846e9b856a5bcb2d93c504c135d47555d16
parent62917100255ea286b93e3df211448bc2425d0e4a (diff)
downloademacs-d1f504609f9e56343a0375d25965d3f718b40eef.tar.gz
emacs-d1f504609f9e56343a0375d25965d3f718b40eef.zip
(modify_event_symbol): If a name_table elt is null,
generate a name to use. Don't crash.
-rw-r--r--src/keyboard.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 327713942fb..371f4c3089e 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2739,7 +2739,14 @@ modify_event_symbol (symbol_num, modifiers, symbol_kind, name_table,
2739 if (NILP (*slot)) 2739 if (NILP (*slot))
2740 { 2740 {
2741 /* No; let's create it. */ 2741 /* No; let's create it. */
2742 *slot = intern (name_table[symbol_num]); 2742 if (name_table[symbol_num])
2743 *slot = intern (name_table[symbol_num]);
2744 else
2745 {
2746 char buf[20];
2747 sprintf (buf, "key-%d", symbol_num);
2748 *slot = intern (buf);
2749 }
2743 2750
2744 /* Fill in the cache entries for this symbol; this also 2751 /* Fill in the cache entries for this symbol; this also
2745 builds the Qevent_symbol_elements property, which the user 2752 builds the Qevent_symbol_elements property, which the user