We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8219c4 commit 05aa50fCopy full SHA for 05aa50f
src/node_buffer.cc
@@ -569,11 +569,10 @@ void Fill(const FunctionCallbackInfo<Value>& args) {
569
THROW_AND_RETURN_UNLESS_BUFFER(env, args[0]);
570
SPREAD_BUFFER_ARG(args[0], ts_obj);
571
572
- CHECK(args[2]->IsUint32());
573
- CHECK(args[3]->IsUint32());
574
-
575
- uint32_t start = args[2].As<Uint32>()->Value();
576
- uint32_t end = args[3].As<Uint32>()->Value();
+ uint32_t start;
+ if (!args[2]->Uint32Value(ctx).To(&start)) return;
+ uint32_t end;
+ if (!args[3]->Uint32Value(ctx).To(&end)) return;
577
size_t fill_length = end - start;
578
Local<String> str_obj;
579
size_t str_length;
0 commit comments