diff --git a/src/main.cpp b/src/main.cpp index b6bafa5..99cd211 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -54,8 +54,9 @@ int main() { const auto line_nc{remove_colors(line)}; // Don't color +++ and --- lines - if (line.length() >= 2 - && (line.length() < 3 || (line_nc[2] != '+' && line_nc[2] != '-'))) + if (line_nc.length() >= 2 + && (line_nc.length() < 3 + || (line_nc[2] != '+' && line_nc[2] != '-'))) { if (line_nc[1] == '+') {