Merge pull request #39 from mcfx0/master
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 := uint(DataArray[offset/64])
|
||||||
data >>= offset % 64
|
data >>= offset % 64
|
||||||
if offset%64 > 64-bpb {
|
if offset%64 > 64-bpb {
|
||||||
l := bpb + offset%64 - 64
|
l := 64 - offset % 64
|
||||||
data &= uint(DataArray[offset/64+1] << l)
|
data |= uint(DataArray[offset/64+1] << l)
|
||||||
}
|
}
|
||||||
data &= mask
|
data &= mask
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user