From 942d8a69bd2e431b4dde6b28e1477ba598eaff68 Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Mon, 22 Mar 1999 14:59:29 +0000 Subject: [PATCH] lstrcpyA can't use strcpy. --- memory/string.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/memory/string.c b/memory/string.c index 30ac2b662f4..f59950f7344 100644 --- a/memory/string.c +++ b/memory/string.c @@ -244,7 +244,7 @@ SEGPTR WINAPI lstrcpy16( SEGPTR dst, LPCSTR src ) /*********************************************************************** - * lstrcpy32A (KERNEL32.608) + * lstrcpyA (KERNEL32.608) */ LPSTR WINAPI lstrcpyA( LPSTR dst, LPCSTR src ) { @@ -257,7 +257,8 @@ LPSTR WINAPI lstrcpyA( LPSTR dst, LPCSTR src ) SetLastError(ERROR_INVALID_PARAMETER); return 0; } - strcpy( dst, src ); + /* this is how Windows does it */ + memmove( dst, src, strlen(src)+1 ); return dst; } -- 2.11.4.GIT