summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/face_registry.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/face_registry.cc b/src/face_registry.cc
index 84f6826b..e7803cac 100644
--- a/src/face_registry.cc
+++ b/src/face_registry.cc
@@ -25,6 +25,9 @@ static FaceRegistry::FaceSpec parse_face(StringView facedesc)
throw runtime_error(invalid_face_error.str());
auto colors_end = std::min(attr_it, base_it);
+ if (underline_it != facedesc.end()
+ and underline_it > colors_end)
+ throw runtime_error(invalid_face_error.str());
auto parse_color = [](StringView spec) {
return spec.empty() ? Color::Default : str_to_color(spec);