From f8a7d5c5797948bd50d4ff4b4413eb18d3dab2d5 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 16 Mar 2022 16:52:57 +0100 Subject: [PATCH] Oops, wrong variable --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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] == '+') {