diff --git a/CMakeLists.txt b/CMakeLists.txt index 16f28e5a4..2bfb476c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,6 +161,7 @@ add_library(libfastfetch OBJECT src/detection/vulkan.c src/detection/media.c src/detection/datetime.c + src/detection/temps.c src/detection/displayserver/displayServer.c src/detection/displayserver/wayland.c src/detection/displayserver/xcb.c diff --git a/src/detection/temps.c b/src/detection/temps.c index 485e0b79e..4fcdc5827 100644 --- a/src/detection/temps.c +++ b/src/detection/temps.c @@ -7,10 +7,7 @@ static bool isTempFile(const char* name) { return - name[0] == 't' && - name[1] == 'e' && - name[2] == 'm' && - name[3] == 'p' && + strncmp(name, "temp", 4) == 0 && name[4] >= '0' && name[4] <= '9' && strncmp(name + 5, "_input", 6) == 0;