fix(Vhd#ensureBatSize): do not round maxTableEntries

This commit is contained in:
Julien Fontanet
2017-02-21 12:11:33 +01:00
parent d64237b4f2
commit d5422dfe89

View File

@@ -430,7 +430,7 @@ class Vhd {
const { first, firstSector, lastSector } = this._getFirstAndLastBlocks()
// extend BAT
const maxTableEntries = header.maxTableEntries = Math.ceil(size / VHD_SECTOR_SIZE) * VHD_SECTOR_SIZE
const maxTableEntries = header.maxTableEntries = size
const batSize = maxTableEntries * VHD_ENTRY_SIZE
{
const prevBat = this.blockTable