From 243c3b4407a4ed025574a010e791566656542151 Mon Sep 17 00:00:00 2001 From: The Tumultuous Unicorn Of Darkness Date: Tue, 8 Oct 2024 12:01:08 +0200 Subject: [PATCH] Core: return empty string in get_gpu_interface_info() when info is not present Related to #356 --- src/core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.cpp b/src/core.cpp index 060e6493..bd2fe9f9 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -1673,7 +1673,7 @@ static std::string get_gpu_interface_info(std::string drm_path, std::string type default: pcie_gen = 0; break; } - return string_format("Gen%1dx%d", pcie_gen, pcie_width); + return ((pcie_gen == 0) || (pcie_width == 0)) ? std::string() : string_format("Gen%1dx%d", pcie_gen, pcie_width); } #endif /* __linux__ */