mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 14:10:51 +10:00
device_probe.py: Fix string assumption for IOName
This commit is contained in:
@@ -47,8 +47,12 @@ class PCIDevice:
|
|||||||
vendor_id_unspoofed = None
|
vendor_id_unspoofed = None
|
||||||
device_id_unspoofed = None
|
device_id_unspoofed = None
|
||||||
|
|
||||||
if "IOName" in properties and properties["IOName"].startswith("pci"):
|
if "IOName" in properties:
|
||||||
vendor_id_unspoofed, device_id_unspoofed = (int(i, 16) for i in properties["IOName"][3:].split(","))
|
ioname = properties["IOName"]
|
||||||
|
if type(ioname) is bytes:
|
||||||
|
ioname = ioname.strip(b"\0").decode()
|
||||||
|
|
||||||
|
vendor_id_unspoofed, device_id_unspoofed = (int(i, 16) for i in ioname[3:].split(","))
|
||||||
if anti_spoof:
|
if anti_spoof:
|
||||||
vendor_id = vendor_id_unspoofed
|
vendor_id = vendor_id_unspoofed
|
||||||
device_id = device_id_unspoofed
|
device_id = device_id_unspoofed
|
||||||
|
|||||||
Reference in New Issue
Block a user