summaryrefslogtreecommitdiffhomepage
path: root/src/anim-atlas.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-02 12:03:40 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-02 12:03:40 +0100
commit50a4e190b4456f342f3106d8e0cc5087f4e2ea6c (patch)
tree38574b681bd989c8b17de87b30beeafb5eab00cb /src/anim-atlas.cpp
parentf8a5e5ba5e4abb50750dbe914349664e958be2ae (diff)
src/anim-atlas: fix bitmask undefined read
Diffstat (limited to 'src/anim-atlas.cpp')
-rw-r--r--src/anim-atlas.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/anim-atlas.cpp b/src/anim-atlas.cpp
index c6193b5b..27051db7 100644
--- a/src/anim-atlas.cpp
+++ b/src/anim-atlas.cpp
@@ -158,6 +158,7 @@ void anim_atlas::make_bitmask_(const ImageView2D& tex, BitArray& array)
(unsigned char)(buf[7*4] >= amin) << 7);
dest[dst_idx] = value;
}
+ dest[(height-j-1)*width+i >> 3] = 0;
for (; i < width; i++)
{
unsigned char alpha = data[(j*stride + i*4)+3];