mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-10 07:38:06 -05:00
Another patch from RDB: prevent luni_send from sending a particular
range of Unicode characters. Not entirely sure I understand this one but I trust that RDB knows what he's talking about with Unicode. [originally from svn r1246]
This commit is contained in:
parent
97a2c907db
commit
5768c6700d
@ -474,6 +474,9 @@ void luni_send(wchar_t * widebuf, int len)
|
||||
/* UTF is a simple algorithm */
|
||||
for (p = linebuffer, i = 0; i < len; i++) {
|
||||
wchar_t ch = widebuf[i];
|
||||
/* Windows wchar_t is UTF-16 */
|
||||
if ((ch&0xF800) == 0xD800) ch = '.';
|
||||
|
||||
if (ch < 0x80) {
|
||||
*p++ = (char) (ch);
|
||||
} else if (ch < 0x800) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user