Skip to content

Commit

Permalink
bug fix (skipping some flags), thanks to @plowdown
Browse files Browse the repository at this point in the history
  • Loading branch information
AmarnathCJD committed Feb 7, 2024
1 parent dee4415 commit 3572791
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/encoding/tl/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,14 @@ func (d *Decoder) decodeObject(o Object, ignoreCRC bool) {
}

for i := 0; i < loopCycles; i++ {
if flagsetIndex == i {
if flagsetIndex == i && !isBitsetAParsed {
optionalBitSetA = d.PopUint()
if d.err != nil {
d.err = errors.Wrap(d.err, "read bitset")
return
}
isBitsetAParsed = true
i = 0
continue
}

Expand All @@ -127,6 +128,7 @@ func (d *Decoder) decodeObject(o Object, ignoreCRC bool) {
return
}
if info.version == 1 {
fmt.Println("optionalBitSetA", optionalBitSetA, "index", info.index, "flagsetIndex", flagsetIndex)
if optionalBitSetA&(1<<info.index) == 0 {
continue
}
Expand Down

0 comments on commit 3572791

Please sign in to comment.