Skip to content

Commit 14c6201

Browse files
boeckmannPerditionC
authored andcommitted
fix INT21.7303 return cluster count one too high
fixes #194
1 parent 4628e43 commit 14c6201

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/dosfns.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ COUNT DosGetExtFree(BYTE FAR * DriveString, struct xfreespace FAR * xfsp)
954954
return DE_INVLDDRV;
955955
xfsp->xfs_secsize = dpbp->dpb_secsize;
956956
xfsp->xfs_totalclusters =
957-
(ISFAT32(dpbp) ? dpbp->dpb_xsize : dpbp->dpb_size);
957+
(ISFAT32(dpbp) ? dpbp->dpb_xsize : dpbp->dpb_size) - 1;
958958
xfsp->xfs_freeclusters = dos_free(dpbp);
959959
xfsp->xfs_clussize = dpbp->dpb_clsmask + 1;
960960
}

0 commit comments

Comments
 (0)