Merge pull request #56111 from kleonc/editor-atlas-packer-zero-height-fix

This commit is contained in:
Rémi Verschelde 2021-12-21 09:30:29 +01:00 committed by GitHub
commit 4a58c08955
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -233,12 +233,12 @@ void EditorAtlasPacker::chart_pack(Vector<Chart> &charts, int &r_width, int &r_h
const int *top_heights = bitmaps[i].top_heights.ptr();
const int *bottom_heights = bitmaps[i].bottom_heights.ptr();
for (int j = 0; j < atlas_w - w; j++) {
for (int j = 0; j <= atlas_w - w; j++) {
int height = 0;
for (int k = 0; k < w; k++) {
int pixmap_h = bottom_heights[k];
if (pixmap_h == -1) {
if (pixmap_h == 0x7FFFFFFF) {
continue; //no pixel here, anything is fine
}