diff options
Diffstat (limited to 'iconvdata/ansi_x3.110.c')
-rw-r--r-- | iconvdata/ansi_x3.110.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/iconvdata/ansi_x3.110.c b/iconvdata/ansi_x3.110.c index 08746cf5f7..b20e12a79c 100644 --- a/iconvdata/ansi_x3.110.c +++ b/iconvdata/ansi_x3.110.c @@ -404,7 +404,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; \ \ @@ -449,6 +449,15 @@ static const char from_ucs4[][2] = inptr += incr; \ } #define LOOP_NEED_FLAGS +#define ONEBYTE_BODY \ + { \ + uint32_t ch = to_ucs4[c]; \ + \ + if (__builtin_expect (ch == 0, 0) && c != '\0') \ + return WEOF; \ + else \ + return ch; \ + } #include <iconv/loop.c> |