mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-15 18:03:06 +12:00
fix core check
This commit is contained in:
parent
dcbdb7360d
commit
4d8aa6b118
|
@ -94,10 +94,10 @@ namespace Cpu {
|
|||
// according to VirtualSMC docs (hackintosh fake SMC) the enumeration follows with alphabetic chars - not implemented yet here (nor in VirtualSMC)
|
||||
long long SMCConnection::getTemp(int core) {
|
||||
char key[] = SMC_KEY_CPU_TEMP;
|
||||
if (core > MaxIndexCount) {
|
||||
return -1;
|
||||
}
|
||||
if (core >= 0) {
|
||||
if ((size_t)core > MaxIndexCount) {
|
||||
return -1;
|
||||
}
|
||||
snprintf(key, 5, "TC%1cc", KeyIndexes[core]);
|
||||
}
|
||||
long long result = getSMCTemp(key);
|
||||
|
|
Loading…
Reference in a new issue