escape the escape character

This commit is contained in:
lucy phipps 2020-06-17 12:40:42 +01:00 committed by alexey.lysiuk
parent 63aeea5b9e
commit 53ad870581
1 changed files with 4 additions and 4 deletions

View File

@ -167,9 +167,9 @@ void I_PrintStr(const char *cp)
else attrib = 0x15;
}
printData.AppendFormat("%c[%um",0x1B,((attrib & 0x8) ? 90 : 30) + (attrib & 0x7));
printData.AppendFormat("\033[%um",((attrib & 0x8) ? 90 : 30) + (attrib & 0x7));
}
else printData.AppendFormat("%c[38;2;%u;%u;%um",27,color.r,color.g,color.b);
else printData.AppendFormat("\033[38;2;%u;%u;%um",color.r,color.g,color.b);
}
}
else if (*srcp != 0x1c && *srcp != 0x1d && *srcp != 0x1e && *srcp != 0x1f)
@ -183,8 +183,8 @@ void I_PrintStr(const char *cp)
}
}
fprintf(stdout,"%s",printData.GetChars());
fprintf(stdout,"%c[0m",0x1B);
fputs(printData.GetChars(),stdout);
fputs("\033[0m",stdout);
}
int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad)