about summary refs log tree commit diff
path: root/iconvdata/iso_6937.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconvdata/iso_6937.c')
-rw-r--r--iconvdata/iso_6937.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/iconvdata/iso_6937.c b/iconvdata/iso_6937.c
index b800a4f860..16263ed033 100644
--- a/iconvdata/iso_6937.c
+++ b/iconvdata/iso_6937.c
@@ -394,7 +394,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;							      \
 									      \
@@ -441,6 +441,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>