mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 05:55:45 +00:00
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:
parent
a904d9f723
commit
16e5818815
1 changed files with 12 additions and 6 deletions
|
@ -12,17 +12,23 @@
|
|||
|
||||
/*
|
||||
* @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--) {
|
||||
*caTo++ = caFrom[1];
|
||||
*caTo++ = *caFrom++;
|
||||
caFrom++;
|
||||
char s0 = src[0];
|
||||
char s1 = src[1];
|
||||
*dst++ = s1;
|
||||
*dst++ = s0;
|
||||
src = src + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue