Fix error when reading palette

This commit is contained in:
蒟蒻
2023-02-16 19:56:46 +08:00
committed by GitHub
parent 18ba5e6a30
commit 24348d3d70

View File

@ -147,7 +147,7 @@ func (p *PaletteContainer[T]) ReadFrom(r io.Reader) (n int64, err error) {
if err != nil { if err != nil {
return n, err return n, err
} }
return n, p.data.Fix(int(nBits)) return n, p.data.Fix(p.bits)
} }
func (p *PaletteContainer[T]) WriteTo(w io.Writer) (n int64, err error) { func (p *PaletteContainer[T]) WriteTo(w io.Writer) (n int64, err error) {