Skip to content

Commit cd0a59a

Browse files
committed
buffer: support SlowCopy buffers > 4GB
1 parent b76bcb3 commit cd0a59a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/node_buffer.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,9 +572,9 @@ void SlowCopy(const FunctionCallbackInfo<Value>& args) {
572572
ArrayBufferViewContents<char> source(args[0]);
573573
SPREAD_BUFFER_ARG(args[1].As<Object>(), target);
574574

575-
const auto target_start = args[2]->Uint32Value(env->context()).ToChecked();
576-
const auto source_start = args[3]->Uint32Value(env->context()).ToChecked();
577-
const auto to_copy = args[4]->Uint32Value(env->context()).ToChecked();
575+
const auto target_start = args[2]->IntegerValue(env->context()).ToChecked();
576+
const auto source_start = args[3]->IntegerValue(env->context()).ToChecked();
577+
const auto to_copy = args[4]->IntegerValue(env->context()).ToChecked();
578578

579579
memmove(target_data + target_start, source.data() + source_start, to_copy);
580580
args.GetReturnValue().Set(to_copy);

0 commit comments

Comments
 (0)