replacing _swab with wine cvs 2006-05-11 version, this will take care of our problem with overlapped memory problem with swab, and this make also two more wine test pass in wine msvcrt test. 100% pass okay now with wine msvcrt string test.

svn path=/trunk/; revision=22070
This commit is contained in:
Magnus Olsen 2006-05-27 11:37:44 +00:00
parent a904d9f723
commit 16e5818815

View file

@ -12,17 +12,23 @@
/* /*
* @implemented * @implemented
*
* copy this swab from wine cvs 2006-05-24
*/ */
void _swab (const char* caFrom, char* caTo, size_t sizeToCopy) void _swab (const char * src, char * dst, size_t sizeToCopy
)
{ {
if (sizeToCopy > 1) if (sizeToCopy > 1)
{ {
sizeToCopy = sizeToCopy >> 1; sizeToCopy = (unsigned)sizeToCopy >> 1;
while (sizeToCopy--) { while (sizeToCopy--) {
*caTo++ = caFrom[1]; char s0 = src[0];
*caTo++ = *caFrom++; char s1 = src[1];
caFrom++; *dst++ = s1;
*dst++ = s0;
src = src + 2;
} }
} }
} }