tweaks: avoid running tolower() on an out-of-range value
Functions like tolower() expect characters in the range -1..255. Reference: https://savannah.gnu.org/bugs/?50289. The other occurrences of toupper(), tolower(), and isxdigit() that don't do a cast are fine, because the values of 'code' or 'keycode' are already guaranteed to be in range by the surrounding code.
This commit is contained in:
parent
58c7358cb3
commit
01c8ffd61f
@ -507,7 +507,7 @@ functionptrtype func_from_key(const int keycode)
|
||||
* with Pico or to mimic 'less' and similar text viewers. */
|
||||
functionptrtype interpret(const int keycode)
|
||||
{
|
||||
if (!meta_key) {
|
||||
if (!meta_key && keycode < 0x7F) {
|
||||
if (keycode == 'N')
|
||||
return do_findprevious;
|
||||
if (keycode == 'n')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user