From 2d115eb64530b342f29fb12588e49447a004e4da Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 5 Nov 2004 11:51:18 +0000 Subject: [PATCH] pass lstrcpynW() the maximum number of characters, not bytes svn path=/trunk/; revision=11541 --- reactos/lib/kernel32/misc/toolhelp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/lib/kernel32/misc/toolhelp.c b/reactos/lib/kernel32/misc/toolhelp.c index 51acfa5b49c..32efb09c34d 100644 --- a/reactos/lib/kernel32/misc/toolhelp.c +++ b/reactos/lib/kernel32/misc/toolhelp.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: toolhelp.c,v 1.8 2004/10/31 19:24:31 weiden Exp $ +/* $Id: toolhelp.c,v 1.9 2004/11/05 11:51:18 weiden Exp $ * * KERNEL32.DLL toolhelp functions * @@ -402,7 +402,7 @@ TH32CreateSnapshotSectionInitialize(DWORD dwFlags, { lstrcpynW(ProcessListEntry->szExeFile, ProcessInfo->ImageName.Buffer, - min(ProcessInfo->ImageName.Length, sizeof(ProcessListEntry->szExeFile) / sizeof(ProcessListEntry->szExeFile[0]))); + min(ProcessInfo->ImageName.Length / sizeof(WCHAR), sizeof(ProcessListEntry->szExeFile) / sizeof(ProcessListEntry->szExeFile[0]))); } else {