Java-binding: remove crash on invalid String encoding.

GitOrigin-RevId: c29f8abdd4207eabf422c01ae67b5d1c73ff6ae8
This commit is contained in:
levlam 2018-01-28 09:18:17 +03:00
parent 99c5bd9ebb
commit afde0fdcc6

View File

@ -107,7 +107,7 @@ static size_t get_utf8_from_utf16_length(const jchar *p, jsize len) {
}
}
LOG(FATAL) << "Receive wrong UTF-16 string";
// TODO wrong UTF-16, it is possible
return 0;
}
result += 1 + (cur >= 0x80) + (cur >= 0x800);