Don't append encoding data when it's null. It throws off the decoder on the box.

This commit is contained in:
Eric MacDonald
2021-09-08 15:15:35 -04:00
parent 80b45e7707
commit 924d4bbe43

View File

@@ -438,7 +438,9 @@ class WTVLzpf {
this.EncodeLiteral(0x08, (this.checksum << 0x18) & 0xFFFFFFFF); this.EncodeLiteral(0x08, (this.checksum << 0x18) & 0xFFFFFFFF);
// End // End
this.AddByte((this.current_literal >>> 0x18) & 0xFF); if (this.current_literal != 0x00) {
this.AddByte((this.current_literal >>> 0x18) & 0xFF);
}
this.AddByte(0x20); this.AddByte(0x20);
return Buffer.from(this.encoded_data); return Buffer.from(this.encoded_data);