mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Correctly handle GPU names with multiple ']'
This commit is contained in:
@@ -90,8 +90,7 @@ static void pciDetectDeviceName(FFGPUResult* gpu, PCIData* pci, struct pci_dev*
|
||||
ffStrbufRecalculateLength(&gpu->name);
|
||||
|
||||
uint32_t openingBracket = ffStrbufFirstIndexC(&gpu->name, '[');
|
||||
uint32_t closingBracket = ffStrbufFirstIndexC(&gpu->name, ']');
|
||||
|
||||
uint32_t closingBracket = ffStrbufLastIndexC(&gpu->name, ']');
|
||||
if(openingBracket < closingBracket && closingBracket < gpu->name.length)
|
||||
{
|
||||
ffStrbufSubstrBefore(&gpu->name, closingBracket);
|
||||
|
||||
Reference in New Issue
Block a user