Skip to content

Commit 22ddcfd

Browse files
committed
Make isVendorAllowed() return false for zero vendor ID
1 parent 79530fa commit 22ddcfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/iab/gdpr/consent/implementation/v1/ByteBufferBackedVendorConsent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public boolean isPurposeAllowed(Purpose purpose) {
112112
@Override
113113
public boolean isVendorAllowed(int vendorId) {
114114
final int maxVendorId = getMaxVendorId();
115-
if (vendorId < 0 || vendorId > maxVendorId) return false;
115+
if (vendorId < 1 || vendorId > maxVendorId) return false;
116116

117117
if (encodingType() == VENDOR_ENCODING_RANGE) {
118118
final boolean defaultConsent = bits.getBit(DEFAULT_CONSENT_OFFSET);

0 commit comments

Comments
 (0)