diff options
author | Jos Dehaes <jos.dehaes@gmail.com> | 2023-08-25 15:52:58 +0200 |
---|---|---|
committer | Jos Dehaes <jos.dehaes@gmail.com> | 2023-08-25 15:52:58 +0200 |
commit | 4d8aa6b11896dac99f81019e6dea11cc8d8856f1 (patch) | |
tree | edc994e7907bc242f85de8efcc279fe5e00edb68 | |
parent | dcbdb7360d44b4071ec0fe0757a0875a12147c8a (diff) |
fix core check
-rw-r--r-- | src/osx/smc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osx/smc.cpp b/src/osx/smc.cpp index ace9ce6..36ac4d9 100644 --- a/src/osx/smc.cpp +++ b/src/osx/smc.cpp @@ -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); |