Index: src/parsing/scanner-character-streams.cc |
diff --git a/src/parsing/scanner-character-streams.cc b/src/parsing/scanner-character-streams.cc |
index 68d531443dba5ca9fd31b88a4684c94aeb924c37..91ed54f7bea227124aea3c0c548540773d984ea0 100644 |
--- a/src/parsing/scanner-character-streams.cc |
+++ b/src/parsing/scanner-character-streams.cc |
@@ -193,7 +193,8 @@ Utf8ToUtf16CharacterStream::~Utf8ToUtf16CharacterStream() { } |
size_t Utf8ToUtf16CharacterStream::CopyChars(uint16_t* dest, size_t length, |
const byte* src, size_t* src_pos, |
size_t src_length) { |
- static const unibrow::uchar kMaxUtf16Character = 0xffff; |
+ static const unibrow::uchar kMaxUtf16Character = |
+ unibrow::Utf16::kMaxNonSurrogateCharCode; |
size_t i = 0; |
// Because of the UTF-16 lead and trail surrogates, we stop filling the buffer |
// one character early (in the normal case), because we need to have at least |