Fix missing (unsigned long) cast for multiplication: this fixes the

FAT16 calculation for the default bpb.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@745 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2004-01-25 17:52:11 +00:00
parent 090b589222
commit 36101b0d51
1 changed files with 1 additions and 1 deletions

View File

@ -469,7 +469,7 @@ VOID CalculateFATData(ddt FAR * pddt, ULONG NumSectors, UBYTE FileSystem)
* not really present cluster. */
clust =
(fatdata - defbpb->bpb_nfat * fatlength) / defbpb->bpb_nsector;
maxclust = (fatlength * defbpb->bpb_nbyte) / 2;
maxclust = ((unsigned long)fatlength * defbpb->bpb_nbyte) / 2;
if (maxclust > FAT16MAX)
maxclust = FAT16MAX;
DebugPrintf(("FAT16: #clu=%lu, fatlen=%u, maxclu=%lu, limit=%u\n",