Skip to content

Commit

Permalink
Core: return empty string in get_gpu_interface_info() when info is no…
Browse files Browse the repository at this point in the history
…t present

Related to #356
  • Loading branch information
TheTumultuousUnicornOfDarkness committed Oct 8, 2024
1 parent fa8c484 commit 243c3b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */

Expand Down

0 comments on commit 243c3b4

Please sign in to comment.