Skip to content

Commit 8340db6

Browse files
authored
fix ESC[m (#574)
1 parent 65f2036 commit 8340db6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libctru/source/console.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,15 @@ static void consoleHandleColorEsc(int code)
437437
escapeSeq.argIdx = 0;
438438
}
439439

440+
440441
static void consoleColorStateShift(void)
441442
{
442443
switch (escapeSeq.state)
443444
{
444445
case ESC_BUILDING_UNKNOWN:
445446
escapeSeq.state = ESC_BUILDING_FORMAT_UNKNOWN;
447+
if (!escapeSeq.hasArg[0])
448+
consoleHandleColorEsc(0);
446449
if (escapeSeq.hasArg[0])
447450
consoleHandleColorEsc(escapeSeq.color.args[0]);
448451
if (escapeSeq.hasArg[1])

0 commit comments

Comments
 (0)