Piotr Caban : msvcrt: Don't forward strncpy to ntdll.
Alexandre Julliard
julliard at winehq.org
Wed Mar 27 15:40:07 CDT 2013
Module: wine
Branch: master
Commit: b6265562728787500d7d6762cdbad7473d408165
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b6265562728787500d7d6762cdbad7473d408165
Author: Piotr Caban <piotr at codeweavers.com>
Date: Wed Mar 27 16:12:34 2013 +0100
msvcrt: Don't forward strncpy to ntdll.
---
dlls/msvcrt/msvcrt.spec | 2 +-
dlls/msvcrt/string.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index cd756e4..278932e 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -1424,7 +1424,7 @@
@ cdecl strncat(str str long) ntdll.strncat
@ cdecl strncat_s(str long str long) MSVCRT_strncat_s
@ cdecl strncmp(str str long) MSVCRT_strncmp
-@ cdecl strncpy(ptr str long) ntdll.strncpy
+@ cdecl strncpy(ptr str long) MSVCRT_strncpy
@ cdecl strncpy_s(ptr long str long)
@ cdecl strnlen(str long) MSVCRT_strnlen
@ cdecl strpbrk(str str) ntdll.strpbrk
diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c
index bf33644..6049dce 100644
--- a/dlls/msvcrt/string.c
+++ b/dlls/msvcrt/string.c
@@ -572,6 +572,19 @@ int CDECL MSVCRT__strnicoll( const char* str1, const char* str2, MSVCRT_size_t c
}
/*********************************************************************
+ * strncpy (MSVCRT.@)
+ */
+char* __cdecl MSVCRT_strncpy(char *dst, const char *src, MSVCRT_size_t len)
+{
+ MSVCRT_size_t i;
+
+ for(i=0; i<len; i++)
+ if((dst[i] = src[i]) == '\0') break;
+
+ return dst;
+}
+
+/*********************************************************************
* strcpy_s (MSVCRT.@)
*/
int CDECL MSVCRT_strcpy_s( char* dst, MSVCRT_size_t elem, const char* src )
More information about the wine-cvs
mailing list