Skip to content

Commit 0509992

Browse files
authored
Merge pull request #97 from BitcoinSchema/nil-check
nil check
2 parents dc61e0d + 4bbc512 commit 0509992

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bob.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ func (a *Aip) FromTape(tape bpu.Tape) {
6161
// Loop over remaining indices if they exist and append to indices slice
6262
a.Indices = make([]int, len(tape.Cell)-finalIndexCount)
6363
for x := finalIndexCount - 1; x < len(tape.Cell); x++ {
64+
if tape.Cell[x].S == nil {
65+
continue
66+
}
6467
if index, err := strconv.Atoi(*tape.Cell[x].S); err == nil {
6568
a.Indices = append(a.Indices, index)
6669
}

0 commit comments

Comments
 (0)