about summary refs log tree commit diff
path: root/iconvdata/gb2312.h
diff options
context:
space:
mode:
Diffstat (limited to 'iconvdata/gb2312.h')
-rw-r--r--iconvdata/gb2312.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/iconvdata/gb2312.h b/iconvdata/gb2312.h
index b8757369fc..922fcc8f77 100644
--- a/iconvdata/gb2312.h
+++ b/iconvdata/gb2312.h
@@ -46,7 +46,7 @@ gb2312_to_ucs4 (const char **s, size_t avail, unsigned char offset)
     return UNKNOWN_10646_CHAR;
 
   idx = (ch - 0x21 - offset) * 94 + (ch2 - 0x21 - offset);
-  if (idx >= 0x1ff1)
+  if (idx > 0x1ff1)
     return UNKNOWN_10646_CHAR;
 
   (*s) += 2;
@@ -73,7 +73,7 @@ ucs4_to_gb2312 (wchar_t wch, char *s, size_t avail)
   const char *cp = NULL;
 
   if (ch < 0xa4)
-    cp = NULL;
+    return UNKNOWN_10646_CHAR;
   else if (ch < 0x101)
     cp = gb2312_from_ucs4_tab1[ch - 0xa4];
   else if (ch == 0x113)