msvcrt: fix _mbccp

Rein Klazes wijn at wanadoo.nl
Sun Nov 20 07:03:31 CST 2005


Hi,

Makes Visual C++  compiler successfully compile and link "cl hello.c".

Changelog:
dlls/msvcrt	: msvcrt.spec
dlls/msvcrt	: mbcs.c
- do not forward _mbccpy to strcpy.
- remove the error message in _mbccpy, it is not an error.

Rein.
-------------- next part --------------
--- wine/dlls/msvcrt/msvcrt.spec	2005-11-03 09:42:37.000000000 +0100
+++ mywine/dlls/msvcrt/msvcrt.spec	2005-11-20 12:20:04.000000000 +0100
@@ -335,7 +335,7 @@
 @ cdecl _mbbtombc(long)
 @ stub _mbbtype #(long long)
 # extern _mbcasemap
-@ cdecl _mbccpy (str str) strcpy
+@ cdecl _mbccpy (str str)
 @ stub _mbcjistojms #(long)
 @ stub _mbcjmstojis #(long)
 @ cdecl _mbclen(ptr)
--- wine/dlls/msvcrt/mbcs.c	2005-08-25 15:29:39.000000000 +0200
+++ mywine/dlls/msvcrt/mbcs.c	2005-11-20 12:45:00.000000000 +0100
@@ -281,11 +281,9 @@ MSVCRT_size_t _mbstrlen(const char* str)
  */
 void _mbccpy(unsigned char* dest, const unsigned char* src)
 {
-  *dest++ = *src;
+  *dest = *src;
   if(MSVCRT___mb_cur_max > 1 && MSVCRT_isleadbyte(*src))
-    *dest = *++src; /* MB char */
-  else
-    ERR("failure.. is this ok?\n");
+    *++dest = *++src; /* MB char */
 }
 
 /*********************************************************************


More information about the wine-patches mailing list