about summary refs log tree commit diff
path: root/iconvdata/gb2312.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-04-13 15:01:09 +0000
committerUlrich Drepper <drepper@redhat.com>1998-04-13 15:01:09 +0000
commit2b47435322f026277a936c039c6ea45b975c2876 (patch)
treef6984d4da34bb384cbb74f637e75907789d3e523 /iconvdata/gb2312.h
parent40b4c81d4ec13a7a5acdeb1288f1d897b511b36c (diff)
downloadglibc-2b47435322f026277a936c039c6ea45b975c2876.tar.gz
glibc-2b47435322f026277a936c039c6ea45b975c2876.tar.xz
glibc-2b47435322f026277a936c039c6ea45b975c2876.zip
Update.
1998-04-13 14:52  Ulrich Drepper  <drepper@cygnus.com>

	* iconvdata/cns11643.c: New file.
	* iconvdata/cns11643.h: New file.
	* iconvdata/cns11643l1.c: New file.
	* iconvdata/cns11643l1.h: New file.
	* iconvdata/euctw.c: New file.
	* iconvdata/Makefile: Add rules for EUC-TW and CNS.
	* iconvdata/gconv-modules: Likewise.

	* iconvdata/eucjp.c: Several bug fixes and improvements.
	* iconvdata/gb2312.h: Likewise.
	* iconvdata/jis0201.h: Likewise.
	* iconvdata/jis0208.h: Likewise.
	* iconvdata/jis0212.h: Likewise.
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)