Fix wrong behavior when data covers two adjacent int64 in fillSection
This commit is contained in:
@ -82,8 +82,8 @@ func fillSection(s *Section, bpb uint, DataArray []int64, palette []uint) {
|
||||
data := uint(DataArray[offset/64])
|
||||
data >>= offset % 64
|
||||
if offset%64 > 64-bpb {
|
||||
l := bpb + offset%64 - 64
|
||||
data &= uint(DataArray[offset/64+1] << l)
|
||||
l := 64 - offset % 64
|
||||
data |= uint(DataArray[offset/64+1] << l)
|
||||
}
|
||||
data &= mask
|
||||
|
||||
|
Reference in New Issue
Block a user