mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 09:50:07 +00:00
[FASTFAT]
Fix the most stupid bug ever in ReactOS history (at least!). Dear Pierre, you pretend you're modifying the FileObject->FileName field, but, as you were told in the early when you learnt C, you're at that point in your code dealing with a local copy of the unicode string. So, if modifying the Buffer field is fine, because it's a pointer to memory zone, containing the wchar string, modifying the Length field is totally pointless because it won't magically modify the unicode string in the file object, and will just be forgotten as long the function will be unstacked. So REALLY modify the file object. VfatSetRenameInformation receives less garbage information now... svn path=/trunk/; revision=63049
This commit is contained in:
parent
65113f23e7
commit
09a8dc268a
|
@ -596,8 +596,8 @@ VfatCreateFile(
|
|||
/* Update FO just to keep file name */
|
||||
/* Skip first slash */
|
||||
++idx;
|
||||
PathNameU.Length = FileNameLen;
|
||||
RtlMoveMemory(&PathNameU.Buffer[0], &PathNameU.Buffer[idx], PathNameU.Length);
|
||||
FileObject->FileName.Length = FileNameLen;
|
||||
RtlMoveMemory(&PathNameU.Buffer[0], &PathNameU.Buffer[idx], FileObject->FileName.Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue