This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bug in ISO-2022-JP-2 converter



This patch fixes a typo in the ISO-2022-JP[-2] converter: instead of clearing
bits 31..3 of __count, the EMIT_SHIFT_TO_INIT macro clears bits 2..0 (which
are normally zero anyway).


2002-04-20  Bruno Haible  <bruno@clisp.org>

	* iconvdata/iso-2022-jp.c (EMIT_SHIFT_TO_INIT): Fix modification mask
	of data->__statep->__count.

--- glibc-20020408/iconvdata/iso-2022-jp.c.bak	Tue Jul 10 22:58:40 2001
+++ glibc-20020408/iconvdata/iso-2022-jp.c	Fri Apr 19 02:41:35 2002
@@ -1,5 +1,5 @@
 /* Conversion module for ISO-2022-JP and ISO-2022-JP-2.
-   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000-2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -237,7 +237,7 @@
 	      *outbuf++ = '(';						      \
 	      *outbuf++ = 'B';						      \
 	      /* Note that this also clears the G2 designation.  */	      \
-	      data->__statep->__count &= ~7;				      \
+	      data->__statep->__count &= 7;				      \
 	      data->__statep->__count |= ASCII_set;			      \
 	    }								      \
 	}								      \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]