Skip to content

Commit dcbf949

Browse files
committed
A tiny bit of progress
1 parent c61c83b commit dcbf949

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/UTF8.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public static class UTF8
2828
if (foundLeadingBytes)
2929
{
3030

31-
3231
if ((b & 0b11100000) == 0b11000000) // Start of a 2-byte sequence
3332
{
3433
TempUtf16CodeUnitCountAdjustment += 1;
@@ -43,7 +42,6 @@ public static class UTF8
4342
TempScalarCountAdjustment += 1;
4443
}
4544

46-
4745
buf -= i;
4846
extraLen = i;
4947
break;
@@ -66,8 +64,8 @@ public static class UTF8
6664
// Validate from this new start point with the adjusted length.
6765
byte* invalidByte = GetPointerToFirstInvalidByteScalar(buf, len + extraLen,out TailUtf16CodeUnitCountAdjustment, out TailScalarCountAdjustment);
6866

69-
utf16CodeUnitCountAdjustment += TailUtf16CodeUnitCountAdjustment;
70-
scalarCountAdjustment += TailScalarCountAdjustment;
67+
utf16CodeUnitCountAdjustment = TailUtf16CodeUnitCountAdjustment;
68+
scalarCountAdjustment = TailScalarCountAdjustment;
7169

7270
return invalidByte;
7371
}

0 commit comments

Comments
 (0)