Fixed possible segfault (thanks to László Vadócz).

This commit is contained in:
Vincent Richard 2009-11-03 12:37:51 +00:00
parent ac6865fe36
commit 75b32c4125

View File

@ -142,7 +142,7 @@ string::size_type stringUtils::countASCIIchars
{ {
if (parserHelpers::isAscii(*i)) if (parserHelpers::isAscii(*i))
{ {
if (*i != '=' || *(i + 1) != '?') // To avoid bad behaviour... if (*i != '=' || ((i + 1) != end && *(i + 1) != '?')) // To avoid bad behaviour...
++count; ++count;
} }
} }