1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-11 13:53:37 +00:00

Updated zip-reader to skip empty entries

This commit is contained in:
Bryan Roe
2020-06-18 11:50:47 -07:00
parent a70825ebb4
commit c269bd6fc5
2 changed files with 14 additions and 12 deletions

View File

@@ -356,17 +356,19 @@ function read(path)
console.info1(' External Attributes: ' + buffer.readUInt32LE(38));
console.info1(' Local Header at: ' + buffer.readUInt32LE(42));
table[name] =
{
name: name,
compressedSize: buffer.readUInt32LE(20),
uncompressedSize: buffer.readUInt32LE(24),
offset: buffer.readUInt32LE(42),
fd: _cdr.self._fd,
compression: buffer.readUInt16LE(10),
crc: buffer.readUInt32LE(16)
};
if (buffer.readUInt32LE(16) != 0)
{
table[name] =
{
name: name,
compressedSize: buffer.readUInt32LE(20),
uncompressedSize: buffer.readUInt32LE(24),
offset: buffer.readUInt32LE(42),
fd: _cdr.self._fd,
compression: buffer.readUInt16LE(10),
crc: buffer.readUInt32LE(16)
};
}
buffer = buffer.slice(46 + nameLength + efLength + comLength);
}