Skip to content

Commit

Permalink
crypto: clarify RandomBytes() error msg
Browse files Browse the repository at this point in the history
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  • Loading branch information
Mickael van der Beek authored and trevnorris committed Sep 17, 2014
1 parent 03e9352 commit c615545
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4723,7 +4723,7 @@ void RandomBytes(const FunctionCallbackInfo<Value>& args) {
// maybe allow a buffer to write to? cuts down on object creation
// when generating random data in a loop
if (!args[0]->IsUint32()) {
return env->ThrowTypeError("Argument #1 must be number > 0");
return env->ThrowTypeError("size must be a number >= 0");
}

const uint32_t size = args[0]->Uint32Value();
Expand Down

0 comments on commit c615545

Please sign in to comment.