make dest output unsigned.

This commit is contained in:
Christopher Jeffrey 2014-09-29 16:49:34 -07:00
parent 898c89a5b2
commit e6f33b2793
1 changed files with 2 additions and 2 deletions

View File

@ -1255,10 +1255,10 @@ NAN_METHOD(FillTransaction) {
ssData >> tx;
// Destination output
int d_output = 0;
unsigned int d_output = 0;
if (options->Get(NanNew<String>("output"))->IsNumber()) {
d_output = options->Get(NanNew<String>("output"))->IntegerValue();
if (d_output < 0 || d_output >= tx.vout.size()) {
if (d_output >= tx.vout.size()) {
return NanThrowError("Destination output does not exist");
}
}