Browse Source

crypto: clarify RandomBytes() error msg

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
v0.11.14-release
Mickael van der Beek 10 years ago
committed by Trevor Norris
parent
commit
c615545416
  1. 2
      src/node_crypto.cc

2
src/node_crypto.cc

@ -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();

Loading…
Cancel
Save