diff options
author | 2016-03-20 19:14:29 +0000 | |
---|---|---|
committer | 2016-03-20 19:14:29 +0000 | |
commit | 8f65425a5240737682ec3a186e1291183e222e5a (patch) | |
tree | 954faaa3b43071c6383ba2cf7a5b2c8cf8a8aebb /lib/libedit/tokenizer.c | |
parent | Fix read_char() for the non-UTF-8 case, in particular for systems (diff) | |
download | wireguard-openbsd-8f65425a5240737682ec3a186e1291183e222e5a.tar.xz wireguard-openbsd-8f65425a5240737682ec3a186e1291183e222e5a.zip |
Fix the public interface function el_getc(3).
On OpenBSD, the effects are to set the return argument to the NUL byte
in case of a read failure (for robustness) and to properly set errno
when the character is out of range and cannot be stored in a byte.
Once we enable UTF-8, this will be needed to avoid returning bogus
bytes for valid Unicode characters.
On systems where the internal representation of wchar_t doesn't
match UCS-4, breakage was potentially even worse.
OK czarkoff@.
Diffstat (limited to 'lib/libedit/tokenizer.c')
0 files changed, 0 insertions, 0 deletions