From 75b32c4125437c720aebca4dec63ced30209e1ba Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 3 Nov 2009 12:37:51 +0000 Subject: [PATCH] =?UTF-8?q?Fixed=20possible=20segfault=20(thanks=20to=20L?= =?UTF-8?q?=C3=A1szl=C3=B3=20Vad=C3=B3cz).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utility/stringUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/stringUtils.cpp b/src/utility/stringUtils.cpp index 03b2057d..abae8f9a 100644 --- a/src/utility/stringUtils.cpp +++ b/src/utility/stringUtils.cpp @@ -142,7 +142,7 @@ string::size_type stringUtils::countASCIIchars { if (parserHelpers::isAscii(*i)) { - if (*i != '=' || *(i + 1) != '?') // To avoid bad behaviour... + if (*i != '=' || ((i + 1) != end && *(i + 1) != '?')) // To avoid bad behaviour... ++count; } }