Added an exception frame for lstrcpy16.

This commit is contained in:
Andreas Mohr 2000-03-19 14:20:28 +00:00 committed by Alexandre Julliard
parent cba7be7954
commit 3c506fa36a
1 changed files with 2 additions and 2 deletions

View File

@ -238,8 +238,7 @@ INT WINAPI lstrcmpiW( LPCWSTR str1, LPCWSTR str2 )
*/
SEGPTR WINAPI lstrcpy16( SEGPTR dst, LPCSTR src )
{
/* this is how Windows does it */
memmove( (LPSTR)PTR_SEG_TO_LIN(dst), src, strlen(src)+1 );
if (!lstrcpyA( PTR_SEG_TO_LIN(dst), src )) dst = 0;
return dst;
}
@ -256,6 +255,7 @@ LPSTR WINAPI lstrcpyA( LPSTR dst, LPCSTR src )
}
__EXCEPT(page_fault)
{
ERR("(%p, %p): page fault occurred ! Caused by bug ?\n", dst, src);
SetLastError( ERROR_INVALID_PARAMETER );
return NULL;
}