summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-12-21 09:30:29 +0100
committerGitHub <noreply@github.com>2021-12-21 09:30:29 +0100
commit4a58c0895556341d7c01e758ca90e0be1b32612b (patch)
tree5fd84f77c9156693323a7f290be56c3e03602960 /editor
parent87c3e284c516eb80e79a3137051295e999a2f4d1 (diff)
parent46eebf11ca57f81590f305a5ba28e445f33a1f4e (diff)
Merge pull request #56111 from kleonc/editor-atlas-packer-zero-height-fix
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_atlas_packer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_atlas_packer.cpp b/editor/editor_atlas_packer.cpp
index 85541c093a..b8eba7e3f8 100644
--- a/editor/editor_atlas_packer.cpp
+++ b/editor/editor_atlas_packer.cpp
@@ -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
}