fix incorrect pixel offset in asset packer trim

This commit is contained in:
Noel Berry 2022-10-28 12:54:01 -07:00 committed by GitHub
parent c204842d2c
commit 20a6d9411d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,7 @@ void Packer::add_entry(u64 id, int w, int h, const Color* pixels, const Recti& s
// TOP:
for (int y = source.y; y < source.y + source.h; y++)
for (int x = source.x, s = y * w; x < source.x + source.w; x++, s++)
for (int x = source.x, s = x + y * w; x < source.x + source.w; x++, s++)
if (pixels[s].a > 0)
{
top = y;