Fix for the bug 3506114: potential crash in replace_invalid

git-svn-id: http://svn.code.sf.net/p/utfcpp/code@130 a809a056-fc17-0410-9590-b4f493f8b08e
This commit is contained in:
ntrifunovic 2012-05-22 22:55:47 +00:00 committed by King_DuckZ
parent 54c1972fc4
commit 282f312506

View file

@ -118,7 +118,7 @@ namespace utf8
utf8::append (replacement, out);
++start;
// just one replacement mark for the sequence
while (utf8::internal::is_trail(*start) && start != end)
while (start != end && utf8::internal::is_trail(*start))
++start;
break;
}