Skip to content

Commit

Permalink
src: fix inconsistency between a check and error
Browse files Browse the repository at this point in the history
dlopen takes exactly 2 arguments, check for exactly 2

PR-URL: #515
Reviewed-By: Rod Vagg <[email protected]>
  • Loading branch information
toastynerd authored and rvagg committed Jan 20, 2015
1 parent 03ee4d8 commit 9419e1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1963,7 +1963,7 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {

CHECK_EQ(modpending, nullptr);

if (args.Length() < 2) {
if (args.Length() != 2) {
env->ThrowError("process.dlopen takes exactly 2 arguments.");
return;
}
Expand Down

0 comments on commit 9419e1f

Please sign in to comment.