adds small color fix

This commit is contained in:
SuperNovaa41 2025-02-12 01:06:08 -05:00
parent b154e897c5
commit 4369ae05bd

View File

@ -92,15 +92,18 @@ static void write_text(char** text, FILE* stream)
{ {
uint i; uint i;
bool newline; bool newline;
const char* yellow_str = (flags.coloured) ? YELLOW_TEXT_STR : "";
const char* green_str = (flags.coloured) ? GREEN_TEXT_STR : "";
fprintf(stream, " "); fprintf(stream, " ");
for (i = 0; i < flags.cols; i++) { for (i = 0; i < flags.cols; i++) {
newline = is_newline(false, (*text)[i]); newline = is_newline(false, (*text)[i]);
fprintf(stream, "%s%c%s", (newline ? YELLOW_TEXT_STR : ""), fprintf(stream, "%s%c%s", (newline ? yellow_str : ""),
(newline ? '.' : (*text)[i]), (newline ? '.' : (*text)[i]),
(newline ? GREEN_TEXT_STR : "")); (newline ? green_str : ""));
} }
} }