Made adjusting the partition size a bit more strict (negative sizes aren't allowed

anymore; maybe we should even introduce a minimal partition size).
This fixes bug #882.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19000 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-10-05 10:55:59 +00:00
parent 65416e2a91
commit f00c299faa
@@ -220,7 +220,7 @@ Partition::AdjustSize(off_t sessionSize)
// To work around buggy (or older) BIOS, we shrink the partition size to
// always fit into its session - this should improve detection of boot
// partitions (see bug #238 for more information)
if (sessionSize < fOffset + fSize)
if (sessionSize < fOffset + fSize && sessionSize > fOffset)
fSize = sessionSize - fOffset;
}
#endif