mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-28 08:14:07 +02:00
Bugfix for certain FAT32 files
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/branches/UNSTABLE@1253 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
6b71193deb
commit
0b892e8479
@ -274,7 +274,7 @@ CLUSTER link_fat(struct dpb FAR * dpbp, CLUSTER Cluster1,
|
||||
{
|
||||
/* form an index so that we can read the block as a */
|
||||
/* byte array */
|
||||
UDWORD res = fgetlong(&bp->b_buffer[idx * 4]);
|
||||
UDWORD res = fgetlong(&bp->b_buffer[idx * 4]) & LONG_LAST_CLUSTER;
|
||||
if (Cluster2 == READ_CLUSTER)
|
||||
{
|
||||
if (res > LONG_BAD)
|
||||
@ -284,7 +284,7 @@ CLUSTER link_fat(struct dpb FAR * dpbp, CLUSTER Cluster1,
|
||||
}
|
||||
/* Finally, put the word into the buffer and mark the */
|
||||
/* buffer as dirty. */
|
||||
fputlong(&bp->b_buffer[idx * 4], Cluster2);
|
||||
fputlong(&bp->b_buffer[idx * 4], Cluster2 & LONG_LAST_CLUSTER);
|
||||
if (res == FREE)
|
||||
wasfree++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user