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
Update src/util.cc
Co-authored-by: Robert Nagy <ronagy@icloud.com>
  • Loading branch information
anonrig and ronag authored Sep 14, 2024
commit 4b28cf1a74209e01adc024264c9e937b5bf63062
5 changes: 2 additions & 3 deletions src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,9 @@ static void MakeUtf8String(Isolate* isolate,

// Add +1 for null termination.
target->AllocateSufficientStorage(expected_length + 1);
target->SetLengthAndZeroTerminate(expected_length);
auto actual_length = simdutf::convert_latin1_to_utf8(
const auto actual_length = simdutf::convert_latin1_to_utf8(
const_char, value_length, target->out());
target->SetLength(actual_length);
target->SetLengthAndZeroTerminate(actual_length);
return;
}

Expand Down