Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
f6bb4883
Commit
f6bb4883
authored
Oct 25, 2008
by
Chong Yidong
Browse files
(read_char_minibuf_menu_prompt): Ensure that
read_char_minibuf_menu_text is large enough to hold the menu string.
parent
6c56a0f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
src/keyboard.c
src/keyboard.c
+13
-12
No files found.
src/keyboard.c
View file @
f6bb4883
...
...
@@ -8558,7 +8558,20 @@ read_char_minibuf_menu_prompt (commandflag, nmaps, maps)
if (! menu_prompting)
return Qnil;
/* Get the menu name from the first map that has one (a prompt string). */
for (mapno = 0; mapno < nmaps; mapno++)
{
name = Fkeymap_prompt (maps[mapno]);
if (!NILP (name))
break;
}
/* If we don't have any menus, just read a character normally. */
if (!STRINGP (name))
return Qnil;
/* Make sure we have a big enough buffer for the menu text. */
width = max (width, SBYTES (name));
if (read_char_minibuf_menu_text == 0)
{
read_char_minibuf_menu_width = width + 4;
...
...
@@ -8572,18 +8585,6 @@ read_char_minibuf_menu_prompt (commandflag, nmaps, maps)
}
menu = read_char_minibuf_menu_text;
/* Get the menu name from the first map that has one (a prompt string). */
for (mapno = 0; mapno < nmaps; mapno++)
{
name = Fkeymap_prompt (maps[mapno]);
if (!NILP (name))
break;
}
/* If we don't have any menus, just read a character normally. */
if (!STRINGP (name))
return Qnil;
/* Prompt string always starts with map's prompt, and a space. */
strcpy (menu, SDATA (name));
nlength = SBYTES (name);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment