diff --git a/reactos/hal/halx86/legacy/bus/pcibus.c b/reactos/hal/halx86/legacy/bus/pcibus.c index a93895efdb2..00457639caa 100644 --- a/reactos/hal/halx86/legacy/bus/pcibus.c +++ b/reactos/hal/halx86/legacy/bus/pcibus.c @@ -1188,7 +1188,7 @@ HalpInitializePciStubs(VOID) sizeof(ULONG))) { /* Validate the vendor ID */ - if ((USHORT)VendorId != PCI_INVALID_VENDORID) + if ((VendorId & 0xFFFF) != PCI_INVALID_VENDORID) { /* Set this as the maximum ID */ MaxPciBusNumber = i;