Skip to content

Commit

Permalink
proof: fix statediff copy bug
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
  • Loading branch information
jsign committed Oct 20, 2023
1 parent 3d7dc63 commit e2cc518
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions proof_ipa.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ func (sd StateDiff) Copy() StateDiff {
ret[i].SuffixDiffs[j].CurrentValue = &[32]byte{}
copy((*ret[i].SuffixDiffs[j].CurrentValue)[:], (*sd[i].SuffixDiffs[j].CurrentValue)[:])
}
if sd[i].SuffixDiffs[j].NewValue != nil {
ret[i].SuffixDiffs[j].NewValue = &[32]byte{}
copy((*ret[i].SuffixDiffs[j].NewValue)[:], (*sd[i].SuffixDiffs[j].NewValue)[:])
}
}
}
return ret
Expand Down

0 comments on commit e2cc518

Please sign in to comment.