kernel: Fixed off-by-one error in GetShortPathNameW.

This commit is contained in:
Alexandre Julliard 2006-08-27 20:15:58 +02:00
parent fce74f7411
commit 5c324c8188
1 changed files with 1 additions and 1 deletions

View File

@ -481,7 +481,7 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR longpath, LPWSTR shortpath, DWORD shortl
tmplen = p - (longpath + lp);
lstrcpynW(tmpshortpath + sp, longpath + lp, tmplen + 1);
/* Check, if the current element is a valid dos name */
if (tmplen <= 8+1+3+1)
if (tmplen <= 8+1+3)
{
BOOLEAN spaces;
memcpy(ustr_buf, longpath + lp, tmplen * sizeof(WCHAR));