From 924d4bbe43f0b97cef64d66e0289f6c715c384f6 Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Wed, 8 Sep 2021 15:15:35 -0400 Subject: [PATCH] Don't append encoding data when it's null. It throws off the decoder on the box. --- zefie_wtvp_minisrv/WTVLzpf.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zefie_wtvp_minisrv/WTVLzpf.js b/zefie_wtvp_minisrv/WTVLzpf.js index 09eb3cfd..ce5c8fdc 100644 --- a/zefie_wtvp_minisrv/WTVLzpf.js +++ b/zefie_wtvp_minisrv/WTVLzpf.js @@ -438,7 +438,9 @@ class WTVLzpf { this.EncodeLiteral(0x08, (this.checksum << 0x18) & 0xFFFFFFFF); // End - this.AddByte((this.current_literal >>> 0x18) & 0xFF); + if (this.current_literal != 0x00) { + this.AddByte((this.current_literal >>> 0x18) & 0xFF); + } this.AddByte(0x20); return Buffer.from(this.encoded_data);