diff --git a/core/src/metrics/SystemInfo.cpp b/core/src/metrics/SystemInfo.cpp index 3ba70a245f..711c7cb885 100644 --- a/core/src/metrics/SystemInfo.cpp +++ b/core/src/metrics/SystemInfo.cpp @@ -318,8 +318,9 @@ SystemInfo::CPUTemperature() { return result; } float temp; - fscanf(file, "%f", &temp); - result.push_back(temp / 1000); + if (fscanf(file, "%f", &temp) != -1) { + result.push_back(temp / 1000); + } } } }