Skip to content

Commit

Permalink
copy nil Cell
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-tron committed Nov 6, 2023
1 parent ccf2a56 commit 1212700
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions boc/cell.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ func (c *Cell) ReadRemainingBits() BitString {
}

func (c *Cell) CopyRemaining() *Cell {
if c == nil {
return nil
}
rCursor := c.bits.rCursor
c2 := NewCellWithBits(c.bits.ReadRemainingBits())
c.bits.rCursor = rCursor
Expand Down

0 comments on commit 1212700

Please sign in to comment.