mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Fixed a bug in FAT12FindAvailableCluster.
svn path=/trunk/; revision=2385
This commit is contained in:
parent
c900b97902
commit
94048a055d
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: fat.c,v 1.34 2001/11/02 22:35:31 hbirr Exp $
|
||||
* $Id: fat.c,v 1.35 2001/11/20 23:40:26 hbirr Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -208,7 +208,7 @@ FAT12FindAvailableCluster(PDEVICE_EXTENSION DeviceExt, PULONG Cluster)
|
|||
PVOID Context;
|
||||
LARGE_INTEGER Offset;
|
||||
|
||||
FatLength = DeviceExt->NumberOfClusters * 2;
|
||||
FatLength = DeviceExt->NumberOfClusters;
|
||||
*Cluster = 0;
|
||||
StartCluster = DeviceExt->LastAvailableCluster;
|
||||
Offset.QuadPart = 0;
|
||||
|
@ -221,7 +221,7 @@ FAT12FindAvailableCluster(PDEVICE_EXTENSION DeviceExt, PULONG Cluster)
|
|||
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
for (i = StartCluster * 2; i < FatLength; i++)
|
||||
for (i = StartCluster; i < FatLength; i++)
|
||||
{
|
||||
FATOffset = (i * 12) / 8;
|
||||
if ((i % 2) == 0)
|
||||
|
@ -242,7 +242,7 @@ FAT12FindAvailableCluster(PDEVICE_EXTENSION DeviceExt, PULONG Cluster)
|
|||
return(STATUS_SUCCESS);
|
||||
}
|
||||
}
|
||||
FatLength = StartCluster * 2;
|
||||
FatLength = StartCluster;
|
||||
StartCluster = 2;
|
||||
}
|
||||
CcUnpinData(Context);
|
||||
|
|
Loading…
Reference in a new issue