From 39c743631bc2cc6c83a7500f8be5b95473bf820e Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 28 May 2022 15:46:39 +0200 Subject: [PATCH] fix: Weird build error on GCC 12.1.0 again This fixes #515 --- lib/libimhex/source/helpers/encoding_file.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libimhex/source/helpers/encoding_file.cpp b/lib/libimhex/source/helpers/encoding_file.cpp index 410908e7c..0fbd63ea5 100644 --- a/lib/libimhex/source/helpers/encoding_file.cpp +++ b/lib/libimhex/source/helpers/encoding_file.cpp @@ -42,6 +42,10 @@ namespace hex { continue; if (delimiterPos >= line.length()) continue; + if (delimiterPos >= from.length()) + continue; + if (delimiterPos >= to.length()) + continue; from = line.substr(0, delimiterPos); to = line.substr(delimiterPos + 1);