JS: Fix UInt160 comparison.

This commit is contained in:
Arthur Britto
2012-10-22 16:56:00 -07:00
parent 59a0393320
commit f4d48f56d8
3 changed files with 13 additions and 5 deletions

View File

@@ -152,7 +152,7 @@ UInt160.prototype.copyTo = function(d) {
};
UInt160.prototype.equals = function(d) {
return this.value === d.value;
return isNaN(this.value) || isNaN(d.value) ? false : this.value.equals(d.value);
};
// value = NaN on error.