Skip to content

Commit

Permalink
fix panic when converting an empty tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhar-petukhov committed Dec 18, 2024
1 parent ee89b5d commit 0d2cf2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/api/converters.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ func convertTuple(v tlb.VmStkTuple) (oas.TvmStackRecord, error) {
var records []tlb.VmStackValue
var err error
r := oas.TvmStackRecord{Type: oas.TvmStackRecordTypeTuple}
if v.Len == 0 {
return r, nil
}
if v.Len == 2 && (v.Data.Tail.SumType == "VmStkTuple" || v.Data.Tail.SumType == "VmStkNull") {
records, err = v.RecursiveToSlice()
} else {
Expand Down

0 comments on commit 0d2cf2c

Please sign in to comment.