mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-10 13:32:31 +03:00
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:
parent
bd67eb857c
commit
bce9bc5027
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user