Handle nil case of empty decompression

This commit is contained in:
ChillerDragon 2024-01-21 14:41:40 +08:00
parent 6e7be263af
commit 2ba05193c5

View file

@ -30,8 +30,12 @@ class Packet
return unless flags_compressed
@payload = @huffman.decompress(@payload.unpack('C*'))
if @payload.nil?
@payload = ''
else
@payload = @payload.pack('C*')
end
end
def annotate_first_row(bytes)
header = bytes[0..2].join(' ').yellow