krnl386.exe: Fix size calculation in GetSystemDirectory16.

This commit is contained in:
Andrew Nguyen 2011-04-16 03:37:29 -05:00 committed by Alexandre Julliard
parent 3474e3da22
commit 43f283c085
1 changed files with 2 additions and 2 deletions

View File

@ -628,11 +628,11 @@ UINT16 WINAPI GetWindowsDirectory16( LPSTR path, UINT16 count )
*/
UINT16 WINAPI GetSystemDirectory16( LPSTR path, UINT16 count )
{
static const char * system16 = "\\SYSTEM";
static const char system16[] = "\\SYSTEM";
char windir[MAX_PATH];
UINT16 len;
len = GetWindowsDirectory16(windir, sizeof(windir) - sizeof(system16)) + sizeof(system16);
len = GetWindowsDirectory16(windir, sizeof(windir) - sizeof(system16) + 1) + sizeof(system16);
if (count >= len)
{
lstrcpyA(path, windir);