fix(vhd-lib/createVhdStreamWithLength): don't call readChunkStrict with 0
Introduced by c26a7a3e5
This commit is contained in:
@@ -41,10 +41,12 @@ module.exports = async function createVhdStreamWithLength(stream) {
|
||||
let streamPosition = 0
|
||||
|
||||
async function readStream(length) {
|
||||
const chunk = await readChunkStrict(stream, length)
|
||||
streamPosition += length
|
||||
readBuffers.push(chunk)
|
||||
return chunk
|
||||
if (length !== 0) {
|
||||
const chunk = await readChunkStrict(stream, length)
|
||||
streamPosition += length
|
||||
readBuffers.push(chunk)
|
||||
return chunk
|
||||
}
|
||||
}
|
||||
|
||||
const footerBuffer = await readStream(FOOTER_SIZE)
|
||||
|
||||
Reference in New Issue
Block a user