[FASTFAT] Magic values--

This commit is contained in:
Pierre Schweitzer 2018-08-19 09:55:03 +02:00
parent 0d13bb1015
commit 4fe7aafe10
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -806,9 +806,11 @@ FATAddEntry(
{
RtlZeroMemory(pFatEntry, DeviceExt->FatInfo.BytesPerCluster);
/* create '.' and '..' */
RtlCopyMemory(&pFatEntry[0].Attrib, &DirContext.DirEntry.Fat.Attrib, sizeof(FAT_DIR_ENTRY) - 11);
RtlCopyMemory(&pFatEntry[0].Attrib, &DirContext.DirEntry.Fat.Attrib,
sizeof(FAT_DIR_ENTRY) - FIELD_OFFSET(FAT_DIR_ENTRY, Attrib));
RtlCopyMemory(pFatEntry[0].ShortName, ". ", 11);
RtlCopyMemory(&pFatEntry[1].Attrib, &DirContext.DirEntry.Fat.Attrib, sizeof(FAT_DIR_ENTRY) - 11);
RtlCopyMemory(&pFatEntry[1].Attrib, &DirContext.DirEntry.Fat.Attrib,
sizeof(FAT_DIR_ENTRY) - FIELD_OFFSET(FAT_DIR_ENTRY, Attrib));
RtlCopyMemory(pFatEntry[1].ShortName, ".. ", 11);
}