From 36101b0d51c7ce612b65dff8ebc80677253eca0e Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Sun, 25 Jan 2004 17:52:11 +0000 Subject: [PATCH] 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 --- kernel/initdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/initdisk.c b/kernel/initdisk.c index 5777ec5..bc9fdeb 100644 --- a/kernel/initdisk.c +++ b/kernel/initdisk.c @@ -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",