]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: console: ignore NUL byte on write in xterm emulation mode as well
authorCorinna Vinschen <corinna@vinschen.de>
Thu, 20 Feb 2020 13:48:03 +0000 (14:48 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 20 Feb 2020 13:58:16 +0000 (14:58 +0100)
commitc9f153580bfb4db4f9ef023b99360d7a746bd450
tree71d73b5331906c825f83496f248c001aa3a33efb
parent7dac41db189986bea31e07f5593c4d9b186050b1
Cygwin: console: ignore NUL byte on write in xterm emulation mode as well

A NUL byte in the output stream got accidentally not handled as IGN char
in xterm console mode.  The internal mbtowc conversion doesn't handle
embedded NUL values gracefully, it always stops converting at NUL bytes.
This broke the output of strings with embedded NUL bytes.

Fix this by always skipping IGN chars in the "normal char output loop"
and make sure not to move the cursor one position to the right, as in
legacy console mode.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/fhandler_console.cc
This page took 0.028288 seconds and 5 git commands to generate.