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