mirror of https://github.com/FDOS/kernel.git
Reverted bad optimization -- (unsigned)Cluster2 may have the high 4 bits set
with LONG_LAST_CLUSTER. git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@902 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
82e66852ee
commit
bb7f10fafc
|
@ -206,7 +206,9 @@ unsigned link_fat(struct dpb FAR * dpbp, CLUSTER Cluster1,
|
|||
else
|
||||
{
|
||||
*fbp0 = (UBYTE)Cluster2;
|
||||
*fbp1 = (*fbp1 & 0xf0) | (UBYTE)((unsigned)Cluster2 >> 8);
|
||||
/* Cluster2 may be set to LONG_LAST_CLUSTER == 0x0FFFFFFFUL or 0xFFFF */
|
||||
/* -- please don't optimize to (UBYTE)((unsigned)Cluster2 >> 8)! */
|
||||
*fbp1 = (*fbp1 & 0xf0) | ((UBYTE)((unsigned)Cluster2 >> 8) & 0x0f);
|
||||
}
|
||||
}
|
||||
else if (ISFAT16(dpbp))
|
||||
|
|
Loading…
Reference in New Issue