From 6a3fecd29446825f7e28dd824fcdeba49831832e Mon Sep 17 00:00:00 2001 From: Ronsor Date: Fri, 18 Aug 2023 09:25:10 -0700 Subject: [PATCH] caff: include uncompressed bits for proper decompressed entries that can't be decoded as a format --- format/caff/caff.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/format/caff/caff.go b/format/caff/caff.go index d2021308..ef2c7713 100644 --- a/format/caff/caff.go +++ b/format/caff/caff.go @@ -192,7 +192,10 @@ func decodeCAFF(d *decode.D) any { infBytes, err := io.ReadAll(flate.NewReader(bytes.NewReader(rawBytes[0x26:]))) if err == nil { infBr := bitio.NewBitReader(infBytes, -1) - d.TryFieldFormatBitBuf("uncompressed", infBr, &probeGroup, format.Probe_In{}) + value, _, err := d.TryFieldFormatBitBuf("uncompressed", infBr, &probeGroup, format.Probe_In{}) + if value == nil && err != nil { + d.FieldRootBitBuf("uncompressed", infBr) + } } } }