From 27378802eaab30d4e43c2bc34867d2aaf5c3cff6 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 21 Apr 2009 20:10:55 +0000 Subject: [PATCH] * ctype.cc (__set_ctype): Copy exact part of the current active character class array. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/ctype.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 47b3efd7b..c069b28c3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2009-04-21 Corinna Vinschen + + * ctype.cc (__set_ctype): Copy exact part of the current active + character class array. + 2009-04-20 Corinna Vinschen * flock.cc (lf_setlock): Handle border case which results in WFMO loop diff --git a/winsup/cygwin/ctype.cc b/winsup/cygwin/ctype.cc index e0d6e7162..224db4c19 100644 --- a/winsup/cygwin/ctype.cc +++ b/winsup/cygwin/ctype.cc @@ -34,7 +34,7 @@ __set_ctype (const char *charset) if (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE) { memcpy (_ctype_b, __ctype_iso[idx], 128); - memcpy (_ctype_b + 256, __ctype_iso[idx], 128); + memcpy (_ctype_b + 256, __ctype_iso[idx] + 256, 128); } __ctype_ptr__ = (char *) (__ctype_iso[idx] + 127); return; @@ -45,7 +45,7 @@ __set_ctype (const char *charset) if (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE) { memcpy (_ctype_b, __ctype_cp[idx], 128); - memcpy (_ctype_b + 256, __ctype_cp[idx], 128); + memcpy (_ctype_b + 256, __ctype_cp[idx] + 256, 128); } __ctype_ptr__ = (char *) (__ctype_cp[idx] + 127); return;