aboutsummaryrefslogtreecommitdiff
path: root/iconvdata/t.61.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconvdata/t.61.c')
-rw-r--r--iconvdata/t.61.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/iconvdata/t.61.c b/iconvdata/t.61.c
index 5227802b22..1e84fe9226 100644
--- a/iconvdata/t.61.c
+++ b/iconvdata/t.61.c
@@ -387,7 +387,7 @@ static const char from_ucs4[][2] =
\
if (__builtin_expect (ch >= 0xc1, 0) && ch <= 0xcf) \
{ \
- /* Composed character. First test whether the next character \
+ /* Composed character. First test whether the next byte \
is also available. */ \
uint32_t ch2; \
\
@@ -427,6 +427,13 @@ static const char from_ucs4[][2] =
inptr += increment; \
}
#define LOOP_NEED_FLAGS
+#define ONEBYTE_BODY \
+ { \
+ uint32_t ch = to_ucs4[c]; \
+ if (ch == 0 && c != '\0') \
+ return WEOF; \
+ return ch; \
+ }
#include <iconv/loop.c>