diff options
author | David Kastrup <dak@gnu.org> | 2014-09-23 21:39:29 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2014-09-23 21:41:20 -0400 |
commit | f7582f9807d9a10fba86f54c4aeaa7444c51a315 (patch) | |
tree | 606e35f2af039921ac2912e9ccbeb6fe18717d8a | |
parent | c5ea75534c683638fb1f3b328efe6ba0d242e485 (diff) | |
download | guile-f7582f9807d9a10fba86f54c4aeaa7444c51a315.tar.gz |
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 be7ecef05c1eea66f30360f658c610710c5cb22e.
Signed-off-by: David Kastrup <dak@gnu.org>
-rw-r--r-- | libguile/ports.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/ports.c b/libguile/ports.c index 8185d8593..3129282f7 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -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; |