mirror of
https://github.com/cubixle/iabtcfv2.git
synced 2026-04-30 17:28:41 +01:00
Compute MaxVendor and MaxVendorIdLI at encoding if not explicitly set
This commit is contained in:
@@ -43,6 +43,13 @@ func (d *DisclosedVendors) Encode() string {
|
||||
}
|
||||
bitSize += entriesSize
|
||||
} else {
|
||||
if d.MaxVendorId == 0 {
|
||||
for id, _ := range d.DisclosedVendors {
|
||||
if id > d.MaxVendorId {
|
||||
d.MaxVendorId = id
|
||||
}
|
||||
}
|
||||
}
|
||||
bitSize += d.MaxVendorId
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user