Avoid crashes under 'which-key-mode'
* src/keyboard.c (Fthis_single_command_keys): Don't allow calls to
Fvector with negative first argument. (Bug#64857)
(cherry picked from commit 65834b8f8d
)
This commit is contained in:
parent
cb1f7db249
commit
d13029cdcd
1 changed files with 2 additions and 2 deletions
|
@ -11116,8 +11116,8 @@ the command loop or by `read-key-sequence'.
|
||||||
The value is always a vector. */)
|
The value is always a vector. */)
|
||||||
(void)
|
(void)
|
||||||
{
|
{
|
||||||
return Fvector (this_command_key_count
|
ptrdiff_t nkeys = this_command_key_count - this_single_command_key_start;
|
||||||
- this_single_command_key_start,
|
return Fvector (nkeys < 0 ? 0 : nkeys,
|
||||||
(XVECTOR (this_command_keys)->contents
|
(XVECTOR (this_command_keys)->contents
|
||||||
+ this_single_command_key_start));
|
+ this_single_command_key_start));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue