diff --git a/src/main.cpp b/src/main.cpp index 0101119..f4370cb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -54,7 +54,7 @@ int main() { const auto line_nc{remove_colors(line)}; // Don't color +++ and --- lines - if (line_nc[2] != '+' && line_nc[2] != '-') + if (line.length() >= 2 && (line_nc[2] != '+' && line_nc[2] != '-')) { if (line_nc[1] == '+') {