Skip to content

Commit

Permalink
fix(gnovm): no ValuePath depths should exceed uint8/2
Browse files Browse the repository at this point in the history
  • Loading branch information
omarsy committed Feb 14, 2025
1 parent be61d7d commit cbbdc89
Show file tree
Hide file tree
Showing 3 changed files with 1,224 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gnovm/pkg/gnolang/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2143,6 +2143,11 @@ const (
)

func NewValuePath(t VPType, depth uint8, index uint16, n Name) ValuePath {
// no ValuePath depths should exceed uint8/2
if depth > 127 {
panic("value path depth overflow")
}

vp := ValuePath{
Type: t,
Depth: depth,
Expand Down
Loading

0 comments on commit cbbdc89

Please sign in to comment.