Fix possible infinite-loop in getCPUBusNums()
Due to a variable-name typo, if cpuBusNum1 had a non-zero value, the
loop adding each byte to cpu.cpuBusNums would never terminate.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I1c2c9bedffac0dbd00c9d4e6de54a6331919ca80
diff --git a/src/peci_pcie.cpp b/src/peci_pcie.cpp
index fa42ea6..a41cbcf 100644
--- a/src/peci_pcie.cpp
+++ b/src/peci_pcie.cpp
@@ -120,7 +120,7 @@
size_t busNum = cpuBusNum1 & 0xFF;
cpu.cpuBusNums.insert(busNum);
// Shift right by one byte
- cpuBusNum >>= 8;
+ cpuBusNum1 >>= 8;
}
cpu.skipCpuBuses = true;
}