mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Logo: don't segfault if --logo-source starts with non-alpha charactors
Ref: #518
This commit is contained in:
+1
-1
@@ -211,7 +211,7 @@ static bool logoHasName(const FFlogo* logo, const FFstrbuf* name, bool small)
|
||||
|
||||
static const FFlogo* logoGetBuiltin(const FFstrbuf* name, FFLogoSize size)
|
||||
{
|
||||
if (name->length == 0)
|
||||
if (name->length == 0 || !isalpha(name->chars[0]))
|
||||
return NULL;
|
||||
|
||||
for(const FFlogo* logo = ffLogoBuiltins[toupper(name->chars[0]) - 'A']; *logo->names; ++logo)
|
||||
|
||||
Reference in New Issue
Block a user