mem fixes for vm. Changed uncle inclusion tests

This commit is contained in:
obscuren
2015-01-09 17:38:35 +01:00
parent 35f4bb96f3
commit 905b8cc82f
3 changed files with 46 additions and 14 deletions

View File

@ -142,6 +142,10 @@ func (m *Memory) Resize(size uint64) {
}
func (m *Memory) Get(offset, size int64) []byte {
if size == 0 {
return nil
}
if len(m.store) > int(offset) {
end := int(math.Min(float64(len(m.store)), float64(offset+size)))