Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
petar-dambovaliev committed Sep 30, 2024
1 parent 8b4d3a8 commit d2f7ef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnovm/pkg/gnolang/alloc.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (alloc *Allocator) Allocate(size int64) {
alloc.DeallocDeleted(deleted)

ca := canAllocate(size)
if (alloc.detonate || ca) && alloc.bytes > alloc.maxBytes {
if (alloc.detonate || !ca) && alloc.bytes > alloc.maxBytes {
panic("allocation limit exceeded")

Check warning on line 122 in gnovm/pkg/gnolang/alloc.go

View check run for this annotation

Codecov / codecov/patch

gnovm/pkg/gnolang/alloc.go#L122

Added line #L122 was not covered by tests
}
alloc.detonate = alloc.bytes > alloc.maxBytes
Expand Down

0 comments on commit d2f7ef0

Please sign in to comment.