mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
Apple GPU: Set length of name buffer
This commit is contained in:
@@ -59,7 +59,8 @@ void ffDetectGPUImpl(FFlist* gpus, const FFinstance* instance)
|
||||
uint32_t modelLength = (uint32_t) ffCFStringGetLength(model);
|
||||
ffStrbufInitA(&gpu->name, modelLength + 1);
|
||||
ffCFStringGetCString(model, gpu->name.chars, modelLength + 1, kCFStringEncodingUTF8);
|
||||
gpu->name.chars[modelLength] = '\0';
|
||||
gpu->name.length = modelLength;
|
||||
gpu->name.chars[gpu->name.length] = '\0';
|
||||
|
||||
ffStrbufInitA(&gpu->vendor, 0);
|
||||
ffStrbufInitA(&gpu->driver, 0);
|
||||
|
||||
Reference in New Issue
Block a user