Ticket #1883: fixed handling of 0xff character in WInput widget.

The 0xff character is valid character in CP1251 codepage,
therefore the proper unsigned extension of char to int
is required in stuff() function to avoid the 0xff as -1
interpretation in handle_char() function.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2009-12-20 19:37:00 +03:00
parent bd67eb857c
commit bce9bc5027

View File

@ -1891,8 +1891,8 @@ void
stuff (WInput *in, const char *text, int insert_extra_space)
{
input_disable_update (in);
while (*text)
handle_char (in, *text++);
while (*text != '\0')
handle_char (in, (unsigned char) *text++); /* unsigned extension char->int */
if (insert_extra_space)
handle_char (in, ' ');
input_enable_update (in);