ncdirect_style_emit: return 0 when no sgr is defined #1791

This commit is contained in:
nick black 2021-06-18 14:50:23 -04:00
parent ce2b89552a
commit 32c34b1782
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -868,6 +868,10 @@ ncdirect_style_emit(ncdirect* n, unsigned stylebits, FILE* out){
stylebits & NCSTYLE_BOLD,
stylebits & NCSTYLE_INVIS,
stylebits & NCSTYLE_PROTECT, 0), out, false);
}else{
// no sgr, interesting. return failure if our stylebits were provided?
// back off to individual enablers? FIXME
return 0;
}
// sgr resets colors, so set them back up if not defaults
if(r == 0){