append the reactos string after a null-character
Modified: trunk/reactos/lib/kernel32/misc/env.c
_____
Modified: trunk/reactos/lib/kernel32/misc/env.c
--- trunk/reactos/lib/kernel32/misc/env.c 2005-02-20 10:20:15 UTC
(rev 13665)
+++ trunk/reactos/lib/kernel32/misc/env.c 2005-02-20 10:21:19 UTC
(rev 13666)
@@ -276,14 +276,14 @@
flag set so we don't screw applications that might
depend on a
certain string */
- ln = wcslen(lpVersionInformation->szCSDVersion);
+ ln = wcslen(lpVersionInformation->szCSDVersion) + 1;
maxlen = (sizeof(lpVersionInformation->szCSDVersion) /
sizeof(lpVersionInformation->szCSDVersion[0]) - 1);
if(maxlen > ln)
{
PWCHAR szVer = lpVersionInformation->szCSDVersion + ln;
RtlZeroMemory(szVer, (maxlen - ln + 1) * sizeof(WCHAR));
wcsncpy(szVer,
- L" ReactOS " KERNEL_VERSION_STR L" (Build "
KERNEL_VERSION_BUILD_STR L")",
+ L"ReactOS " KERNEL_VERSION_STR L" (Build "
KERNEL_VERSION_BUILD_STR L")",
maxlen - ln);
}
Show replies by date