fix(Vhd#ensureBatSize): Buffer#size → Buffer#length

This commit is contained in:
Julien Fontanet
2017-02-22 18:18:27 +01:00
parent c15ede6239
commit 3758cd207b

View File

@@ -398,7 +398,7 @@ class Vhd {
const prevBat = this.blockTable
const bat = this.blockTable = Buffer.allocUnsafe(batSize)
prevBat.copy(bat)
bat.fill(BUF_BLOCK_UNUSED, prevBat.size)
bat.fill(BUF_BLOCK_UNUSED, prevBat.length)
debug(`ensureBatSize: extend in memory BAT ${prevMaxTableEntries} -> ${maxTableEntries}`)
const extendBat = () => {
@@ -406,7 +406,7 @@ class Vhd {
return this._write(
constantStream(BUF_BLOCK_UNUSED, maxTableEntries - prevMaxTableEntries),
tableOffset + prevBat.size
tableOffset + prevBat.length
)
}