summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-06-10 21:30:18 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-11 11:38:15 +0200
commit54a33c45bb9b7803309d574c5c20bd656cc43b47 (patch)
treefdb2925e82e842b0b27350dab4ca557e24476e64 /Kernel
parent79a47d9bd3f35c0858531a503aaf28501f988599 (diff)
downloadserenity-54a33c45bb9b7803309d574c5c20bd656cc43b47.zip
Kernel: Add missing BrightWhite color to VirtualConsole
Because of the 'default' label, the compiler did not warn about the missing field. The `VERIFY_NOT_REACHED` was moved out of the switch to fix this.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/TTY/VirtualConsole.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/Kernel/TTY/VirtualConsole.cpp b/Kernel/TTY/VirtualConsole.cpp
index f8bd709cd5..065907a35c 100644
--- a/Kernel/TTY/VirtualConsole.cpp
+++ b/Kernel/TTY/VirtualConsole.cpp
@@ -208,7 +208,7 @@ static inline Graphics::Console::Color ansi_color_to_standard_vga_color(VT::Colo
case VT::Color::ANSIColor::Red:
return Graphics::Console::Color::Red;
case VT::Color::ANSIColor::Green:
- return Graphics::Console::Green;
+ return Graphics::Console::Color::Green;
case VT::Color::ANSIColor::Yellow:
// VGA only has bright yellow, and treats normal yellow as a brownish orange color.
return Graphics::Console::Color::Brown;
@@ -220,9 +220,9 @@ static inline Graphics::Console::Color ansi_color_to_standard_vga_color(VT::Colo
return Graphics::Console::Color::Cyan;
case VT::Color::ANSIColor::DefaultForeground:
case VT::Color::ANSIColor::White:
- return Graphics::Console::Color::White;
- case VT::Color::ANSIColor::BrightBlack:
return Graphics::Console::Color::LightGray;
+ case VT::Color::ANSIColor::BrightBlack:
+ return Graphics::Console::Color::DarkGray;
case VT::Color::ANSIColor::BrightRed:
return Graphics::Console::Color::BrightRed;
case VT::Color::ANSIColor::BrightGreen:
@@ -235,9 +235,10 @@ static inline Graphics::Console::Color ansi_color_to_standard_vga_color(VT::Colo
return Graphics::Console::Color::BrightMagenta;
case VT::Color::ANSIColor::BrightCyan:
return Graphics::Console::Color::BrightCyan;
- default:
- VERIFY_NOT_REACHED();
+ case VT::Color::ANSIColor::BrightWhite:
+ return Graphics::Console::Color::White;
}
+ VERIFY_NOT_REACHED();
}
static inline Graphics::Console::Color terminal_to_standard_color(VT::Color color)