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:
David Lawrence Ramsey 2005-08-01 18:56:46 +00:00
parent bf0e47dc37
commit 56e36ef7b5
2 changed files with 5 additions and 2 deletions

View File

@ -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)

View File

@ -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