From 59e447fc8fdcaef89fb4557a8d11a76337c2df35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Thu, 19 Feb 2004 21:24:54 +0000 Subject: [PATCH] Also zero out first sector of root dir when formatting FAT12 and FAT16 volumes svn path=/trunk/; revision=8274 --- reactos/lib/fslib/vfatlib/fat12.c | 2 +- reactos/lib/fslib/vfatlib/fat16.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/lib/fslib/vfatlib/fat12.c b/reactos/lib/fslib/vfatlib/fat12.c index f22cb01683d..16dca94701b 100644 --- a/reactos/lib/fslib/vfatlib/fat12.c +++ b/reactos/lib/fslib/vfatlib/fat12.c @@ -223,7 +223,7 @@ Fat12WriteRootDirectory(IN HANDLE FileHandle, memset(Buffer, 0, 32 * 1024); Sectors = 32 * 1024 / BootSector->BytesPerSector; - for (i = 1; i < RootDirSectors; i += Sectors) + for (i = 0; i < RootDirSectors; i += Sectors) { /* Zero some sectors of the root directory */ FileOffset.QuadPart = (FirstRootDirSector + i) * BootSector->BytesPerSector; diff --git a/reactos/lib/fslib/vfatlib/fat16.c b/reactos/lib/fslib/vfatlib/fat16.c index d7a2877a579..0867d8a08ce 100644 --- a/reactos/lib/fslib/vfatlib/fat16.c +++ b/reactos/lib/fslib/vfatlib/fat16.c @@ -226,7 +226,7 @@ Fat16WriteRootDirectory(IN HANDLE FileHandle, memset(Buffer, 0, 32 * 1024); Sectors = 32 * 1024 / BootSector->BytesPerSector; - for (i = 1; i < RootDirSectors; i += Sectors) + for (i = 0; i < RootDirSectors; i += Sectors) { /* Zero some sectors of the root directory */ FileOffset.QuadPart = (FirstRootDirSector + i) * BootSector->BytesPerSector;