aboutsummaryrefslogtreecommitdiff
path: root/iconvdata/iso_6937-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconvdata/iso_6937-2.c')
-rw-r--r--iconvdata/iso_6937-2.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/iconvdata/iso_6937-2.c b/iconvdata/iso_6937-2.c
index a2b174ee65..b6bf2c0696 100644
--- a/iconvdata/iso_6937-2.c
+++ b/iconvdata/iso_6937-2.c
@@ -402,7 +402,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. */ \
int ch2; \
\
@@ -449,6 +449,13 @@ static const char from_ucs4[][2] =
outptr += 4; \
}
#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>