Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 049ef34 commit 1784768Copy full SHA for 1784768
src/node_buffer.cc
@@ -570,6 +570,8 @@ void StringSlice(const FunctionCallbackInfo<Value>& args) {
570
void DecodeUTF8(const FunctionCallbackInfo<Value>& args) {
571
Environment* env = Environment::GetCurrent(args); // list, flags
572
573
+ CHECK_GE(args.Length(), 1);
574
+
575
if (!(args[0]->IsArrayBuffer() || args[0]->IsSharedArrayBuffer() ||
576
args[0]->IsArrayBufferView())) {
577
return node::THROW_ERR_INVALID_ARG_TYPE(
@@ -580,7 +582,6 @@ void DecodeUTF8(const FunctionCallbackInfo<Value>& args) {
580
582
581
583
ArrayBufferViewContents<char> buffer(args[0]);
584
- CHECK(args[1]->IsBoolean());
585
bool ignore_bom = args[1]->IsTrue();
586
587
const char* data = buffer.data();
0 commit comments