Fix cpu temp detection the second

This commit is contained in:
Linus Dierheimer
2022-06-16 14:55:02 +02:00
parent 481affa50a
commit 5e96ba8384
3 changed files with 35 additions and 27 deletions
+9
View File
@@ -526,6 +526,15 @@ void ffStrbufPutTo(const FFstrbuf* strbuf, FILE* file)
fputc('\n', file);
}
double ffStrbufToDouble(const FFstrbuf* strbuf)
{
double value;
if(sscanf(strbuf->chars, "%lf", &value) != 1)
return 0.0 / 0.0; //NaN
return value;
}
void ffStrbufDestroy(FFstrbuf* strbuf)
{
free(strbuf->chars);
+2
View File
@@ -93,6 +93,8 @@ bool ffStrbufRemoveIgnCaseEndS(FFstrbuf* strbuf, const char* end);
void ffStrbufWriteTo(const FFstrbuf* strbuf, FILE* file);
void ffStrbufPutTo(const FFstrbuf* strbuf, FILE* file);
double ffStrbufToDouble(const FFstrbuf* strbuf);
void ffStrbufDestroy(FFstrbuf* strbuf);
#endif