Skip to content

Commit

Permalink
fixup! src: replace custom ASCII validation with simutf one
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
addaleax and tniessen committed Jan 19, 2023
1 parent 52c8926 commit 5e740f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/string_bytes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ MaybeLocal<Value> StringBytes::Encode(Isolate* isolate,

case ASCII:
if (simdutf::validate_ascii_with_errors(buf, buflen).error) {
// The input contains non-ASCII bytes
// The input contains non-ASCII bytes.
char* out = node::UncheckedMalloc(buflen);
if (out == nullptr) {
*error = node::ERR_MEMORY_ALLOCATION_FAILED(isolate);
Expand Down

0 comments on commit 5e740f8

Please sign in to comment.