Commit ec2cb208 authored by vogelheim's avatar vogelheim Committed by Commit bot

Fix Scanner::PushBack for surrogate code points.

A wise man once said: If you want right result, compare right value.

R=rossberg@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1939173002
Cr-Commit-Position: refs/heads/master@{#35967}
parent 0e4469fd
......@@ -588,7 +588,7 @@ class Scanner {
}
void PushBack(uc32 ch) {
if (ch > static_cast<uc32>(unibrow::Utf16::kMaxNonSurrogateCharCode)) {
if (c0_ > static_cast<uc32>(unibrow::Utf16::kMaxNonSurrogateCharCode)) {
source_->PushBack(unibrow::Utf16::TrailSurrogate(c0_));
source_->PushBack(unibrow::Utf16::LeadSurrogate(c0_));
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment