mirror of git://git.sv.gnu.org/nano.git
in get_word_kbinput(), limit the input word to hexadecimal FFFD instead
of FFFF, as FFFE and FFFF are invalid Unicode characters git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2967 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
bf0e47dc37
commit
56e36ef7b5
|
@ -260,6 +260,9 @@ CVS code -
|
|||
the number of lines and characters in the file or selection,
|
||||
as wc does. (DLR)
|
||||
- winio.c:
|
||||
get_word_kbinput()
|
||||
- Limit the input word to hexadecimal FFFD instead of FFFF, as
|
||||
FFFE and FFFF are invalid Unicode characters. (DLR)
|
||||
display_string()
|
||||
- Instead of using parse_mbchar()'s bad_chr parameter, use
|
||||
mbrep() to get the representation of a bad character. (DLR)
|
||||
|
|
|
@ -1232,7 +1232,7 @@ int get_byte_kbinput(int kbinput
|
|||
}
|
||||
|
||||
/* Translate a word sequence: turn a four-digit hexadecimal number from
|
||||
* 0000 to ffff (case-insensitive) into its corresponding word value. */
|
||||
* 0000 to fffd (case-insensitive) into its corresponding word value. */
|
||||
int get_word_kbinput(int kbinput
|
||||
#ifndef NANO_SMALL
|
||||
, bool reset
|
||||
|
@ -1303,7 +1303,7 @@ int get_word_kbinput(int kbinput
|
|||
word += (kbinput - '0');
|
||||
retval = word;
|
||||
} else if ('a' <= tolower(kbinput) &&
|
||||
tolower(kbinput) <= 'f') {
|
||||
tolower(kbinput) <= 'd') {
|
||||
word += (tolower(kbinput) + 10 - 'a');
|
||||
retval = word;
|
||||
} else
|
||||
|
|
Loading…
Reference in New Issue