mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Fix ungetc for characters 0x80 <= c < 0xf0 in UTF-8.
Fixes <http://bugs.gnu.org/18536>.
* libguile/ports.c (scm_ungetc_unlocked): Fix bad UTF-8 reencoding,
introduced in commit be7ecef05c
.
Signed-off-by: David Kastrup <dak@gnu.org>
This commit is contained in:
parent
c5ea75534c
commit
f7582f9807
1 changed files with 1 additions and 1 deletions
|
@ -2139,7 +2139,7 @@ scm_ungetc_unlocked (scm_t_wchar c, SCM port)
|
|||
|
||||
if (pti->encoding_mode == SCM_PORT_ENCODING_MODE_UTF8)
|
||||
{
|
||||
if (c < 0xf0)
|
||||
if (c < 0x80)
|
||||
{
|
||||
result_buf[0] = (char) c;
|
||||
result = result_buf;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue