diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c index 63d977b..7d0dc35 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -205,8 +205,12 @@ static BOOL add_boot_rename_entry( LPCWSTR source, LPCWSTR dest, DWORD flags ) if (dest) { if (flags & MOVEFILE_REPLACE_EXISTING) + { *p++ = '!'; - memcpy( p, dest_name.Buffer, len2 ); + memcpy( p, dest_name.Buffer, len2 - sizeof(WCHAR) ); + } + else + memcpy( p, dest_name.Buffer, len2 ); DataSize += len2; } else