Tcl_ReadChars() is a nonblocking function and may return 0 even if select(2)
indicated some data was available. Cope with this by explicitly checking for
EOF if Tcl_ReadChars() returned 0.
Interestingly, this makes the comment immediately preceding the test accurate
once more.
To trigger the failure this patch fixes easily, run with a multi-byte locale (e.g.
en_GB.UTF-8) and over a pty/serial port/etc., send a single octet of a valid
multi-byte character (e.g. 0xE0).
Whilst I generated this patch against 5.44.1.15 it applies fine against 5.45 and
a visual inspection shows all is well.
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
Last edit: Anonymous 2018-09-26
Closing, should already be fixed by now.