From badeb658e2c5e81c49d484a60cdf72122e887b86 Mon Sep 17 00:00:00 2001 From: cybran Date: Fri, 11 Aug 2023 20:26:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=89=A7=E8=A1=8C=20T?= =?UTF-8?q?extEncoder=20=E5=AF=BC=E8=87=B4=E7=9A=84=E5=86=85=E5=AD=98?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/node_buffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 598b92d0..ffe30937 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -1179,7 +1179,7 @@ static void EncodeUtf8String(const FunctionCallbackInfo& args) { str->WriteUtf8(isolate, static_cast(bs->Data()), - -1, // We are certain that `data` is sufficiently large + length, // We are certain that `data` is sufficiently large nullptr, String::NO_NULL_TERMINATION | String::REPLACE_INVALID_UTF8); -- Gitee