summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-09-20 16:09:36 +0200
committerGitHub <noreply@github.com>2021-09-20 16:09:36 +0200
commit2d1699ef82a29ef65d810194ee76dddc0d9e0389 (patch)
tree4dcec1d1498907b4e99aa71baa1a41490a394bdc
parentaa4ff588c92ddaaec502336fd3fc4a13d9148c9d (diff)
parent395ab3441d68c23d12fd9a2de6740c386b3072aa (diff)
Merge pull request #42103 from dankan1890/import_atlas_fix
-rw-r--r--editor/import/resource_importer_texture_atlas.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp
index dec1466da1..869af209d3 100644
--- a/editor/import/resource_importer_texture_atlas.cpp
+++ b/editor/import/resource_importer_texture_atlas.cpp
@@ -131,9 +131,9 @@ static void _plot_triangle(Vector2i *vertices, const Vector2i &p_offset, bool p_
double xf = x[0];
double xt = x[0] + dx_upper; // if y[0] == y[1], special case
int max_y = MIN(y[2], height - p_offset.y - 1);
- for (int yi = y[0]; yi <= max_y; yi++) {
+ for (int yi = y[0]; yi < max_y; yi++) {
if (yi >= 0) {
- for (int xi = (xf > 0 ? int(xf) : 0); xi <= (xt < width ? xt : width - 1); xi++) {
+ for (int xi = (xf > 0 ? int(xf) : 0); xi < (xt < width ? xt : width - 1); xi++) {
int px = xi, py = yi;
int sx = px, sy = py;
sx = CLAMP(sx, 0, src_width - 1);