Skip to content

Commit

Permalink
dns: fixed compilation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ShogunPanda committed Apr 16, 2024
1 parent cbdc32c commit 27ca526
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cares_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,10 @@ void GetAddrInfo(const FunctionCallbackInfo<Value>& args) {
}

Local<Uint32> order;
args[4]->ToUint32(env->context()).ToLocal(&order);
if (!args[4]->ToUint32(env->context()).ToLocal(&order)) {
THROW_ERR_INVALID_ARG_VALUE(env, "bad order");
return;
}

auto req_wrap = std::make_unique<GetAddrInfoReqWrap>(env,
req_wrap_obj,
Expand Down

0 comments on commit 27ca526

Please sign in to comment.