Fix bug in Utf8Utils

This commit is contained in:
Ben Gruver 2012-07-13 18:27:27 -07:00
parent 343df2f456
commit 66b89545a4

View File

@ -136,7 +136,7 @@ public final class Utf8Utils {
return throwBadUtf8(v1, at + 1);
}
int v2 = bytes[at + 2] & 0xFF;
if ((v1 & 0xc0) != 0x80) {
if ((v2 & 0xc0) != 0x80) {
return throwBadUtf8(v2, at + 2);
}
int value = ((v0 & 0x0f) << 12) | ((v1 & 0x3f) << 6) |