Fix binary parsing of Vector256

This commit is contained in:
Nicholas Dudfield
2014-02-01 10:46:04 +07:00
parent 430dfef23d
commit 23528293e0
2 changed files with 17 additions and 1 deletions

View File

@@ -570,7 +570,8 @@ var STVector256 = exports.Vector256 = new SerializedType({
parse: function (so) {
var length = this.parse_varint(so);
var output = [];
for (var i=0; i<length; i++) {
// length is number of bytes not number of Hash256
for (var i=0; i<length / 32; i++) {
output.push(STHash256.parse(so));
}
return output;