Skip to content

Commit e4a1a83

Browse files
Fix keys not being bolt if main color is not set
1 parent 1e3cabf commit e4a1a83

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/logo/logo.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,11 @@ void ffPrintLogoAndKey(FFinstance* instance, const char* moduleName, uint8_t mod
257257
if(!instance->config.pipe)
258258
{
259259
fputs(FASTFETCH_TEXT_MODIFIER_RESET FASTFETCH_TEXT_MODIFIER_BOLT, stdout);
260-
ffPrintColor(&instance->config.mainColor);
260+
261+
//If the main color is not set (e.g. none logo), this would reset in \0333[m, which resets everything,
262+
//including the wanted bolt from above. So we only print it, if the main color is at least one char.
263+
if(instance->config.mainColor.length > 0)
264+
ffPrintColor(&instance->config.mainColor);
261265
}
262266

263267
if(customKeyFormat == NULL || customKeyFormat->length == 0)

0 commit comments

Comments
 (0)