From 102121993a3cedba96d6a7bb39662c93768b6fa1 Mon Sep 17 00:00:00 2001 From: Peter Berg Larsen Date: Mon, 18 Apr 2005 15:37:15 +0000 Subject: [PATCH] Eliminate strncpy. Correct a \0 assingment to the modstr variable. --- dlls/user/text.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user/text.c b/dlls/user/text.c index eb1c18e9b0b..6c0274738c4 100644 --- a/dlls/user/text.c +++ b/dlls/user/text.c @@ -284,8 +284,8 @@ static void TEXT_PathEllipsify (HDC hdc, WCHAR *str, unsigned int max_len, if (modstr) { - strncpyW (modstr, str, *len_str); - *(str+*len_str) = '\0'; + memcpy(modstr, str, *len_str * sizeof(WCHAR)); + modstr[*len_str] = '\0'; } }