Skip to content

Commit

Permalink
fix core check
Browse files Browse the repository at this point in the history
  • Loading branch information
joske committed Aug 25, 2023
1 parent dcbdb73 commit 4d8aa6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/osx/smc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4d8aa6b

Please sign in to comment.