Fixed issue with var int reading.

Reading uneven byte slices were broken.
This commit is contained in:
obscuren
2014-07-29 23:33:18 +02:00
parent 6e94c024e4
commit 6fd2401cdf
2 changed files with 27 additions and 4 deletions

View File

@ -67,7 +67,6 @@ func (val *Value) Uint() uint64 {
return uint64(Val)
} else if Val, ok := val.Val.([]byte); ok {
return new(big.Int).SetBytes(Val).Uint64()
//return ReadVarint(bytes.NewReader(Val))
} else if Val, ok := val.Val.(*big.Int); ok {
return Val.Uint64()
}