Fix for the bug [ 1528544 ] utf::next does not work correctly for 4-byte sequences

git-svn-id: http://svn.code.sf.net/p/utfcpp/code@23 a809a056-fc17-0410-9590-b4f493f8b08e
This commit is contained in:
ntrifunovic 2006-07-26 17:31:51 +00:00
parent d3097494fc
commit ad118a86e7

View file

@ -161,7 +161,7 @@ namespace internal
break;
case 4:
if (is_trail(*(++it))) {
cp = ((cp << 18) & 0x1fffff) + (mask8(*it) << 12) & 0x3ffff;
cp = ((cp << 18) & 0x1fffff) + ((mask8(*it) << 12) & 0x3ffff);
if (is_trail(*(++it))) {
cp += (mask8(*it) << 6) & 0xfff;
if (is_trail(*(++it))) {