OSDN Git Service

* strfuncs.cc (sys_cp_mbstowcs): Reset shift state after handling
authorcorinna <corinna>
Tue, 22 Sep 2009 09:44:32 +0000 (09:44 +0000)
committercorinna <corinna>
Tue, 22 Sep 2009 09:44:32 +0000 (09:44 +0000)
invalid multibyte sequence.

winsup/cygwin/ChangeLog
winsup/cygwin/strfuncs.cc

index d3d9214..ad149c8 100644 (file)
@@ -1,5 +1,10 @@
 2009-09-22  Corinna Vinschen  <corinna@vinschen.de>
 
+       * strfuncs.cc (sys_cp_mbstowcs): Reset shift state after handling
+       invalid multibyte sequence.
+
+2009-09-22  Corinna Vinschen  <corinna@vinschen.de>
+
        * path.cc (symlink_worker): Rework error handling to generate Linux
        compatible errno in case of trailing slash in newpath.
 
index e16d94d..88bbf76 100644 (file)
@@ -600,6 +600,7 @@ sys_cp_mbstowcs (mbtowc_p f_mbtowc, char *charset, wchar_t *dst, size_t dlen,
             decoding errors, seems like the best we can do. */
          if (dst)
            *ptr = L'\xdc80' | *pmbs;
+         memset (&ps, 0, sizeof ps);
          bytes = 1;
        }