Merge pull request #674 from travisturner/container-corrupt

stop setting N on a frozen container
This commit is contained in:
Travis Turner 2020-08-16 15:59:58 -05:00 • committed by GitHub
commit c5e9b8d917
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3287,7 +3287,6 @@ func (c *Container) arrayRemove(v uint16) (*Container, bool) {
}
// removing the last item? we can just return the empty container.
if c.N() == 1 {
c.n = 0
return nil, true
}
c = c.Thaw()
@ -3304,7 +3303,6 @@ func (c *Container) bitmapRemove(v uint16) (*Container, bool) {
}
// removing the last item? we can just return the empty container.
if c.N() == 1 {
c.n = 0
return nil, true
}
c = c.Thaw()
@ -3330,7 +3328,6 @@ func (c *Container) runRemove(v uint16) (*Container, bool) {
}
// removing the last item? we can just return the empty container.
if c.N() == 1 {
c.n = 0
return nil, true
}
c = c.Thaw()