From 50d3a0823525dfbedad5725501a0bc44356eff7b Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 30 Jan 2022 17:40:46 -0300 Subject: [PATCH] Limit the amount of 0 bytes required to avoid PnP detection --- biostools/analyzers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biostools/analyzers.py b/biostools/analyzers.py index bfed655..1cd3efd 100644 --- a/biostools/analyzers.py +++ b/biostools/analyzers.py @@ -1122,7 +1122,7 @@ class BonusAnalyzer(Analyzer): device = None # Take valid data only. - if device_id != b'\x00\x00\x00\x00' and (vendor or device): + if device_id[:2] != b'\x00\x00' and (vendor or device): # Add PnP ID (endianness swapped to help the front-end in # processing it), vendor name and device name to the list. self.oroms.append((struct.unpack('>I', device_id)[0], vendor, device))