Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update src/util.cc
Co-authored-by: Robert Nagy <ronagy@icloud.com>
  • Loading branch information
anonrig and ronag authored Sep 12, 2024
commit cb36b86d92eb5fde2f4a1c07d5db8d8957c46a4e
2 changes: 1 addition & 1 deletion src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static void MakeUtf8String(Isolate* isolate,
if (value_view.is_one_byte()) {
Comment thread
anonrig marked this conversation as resolved.
auto const_char = reinterpret_cast<const char*>(value_view.data8());
auto expected_length =
target->capacity() > (static_cast<size_t>(value_length) * 2 + 1)
target->capacity() < (static_cast<size_t>(value_length) * 2 + 1)
? simdutf::utf8_length_from_latin1(const_char, value_length)
: value_length * 2;

Expand Down