summaryrefslogtreecommitdiff
path: root/scene/resources/texture.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-01-15 11:03:37 +0100
committerGitHub <noreply@github.com>2019-01-15 11:03:37 +0100
commit96899b7ee1cb442ce9625232d558670fe7011c2c (patch)
tree31e281711d0a7fc3ddd520689dd80a2330316ec2 /scene/resources/texture.cpp
parent9ed34d44238d130f5c7d999bb7265e7c0e906567 (diff)
parent3beca92d61c21a9801145ee0b99bc89e87f2c733 (diff)
Merge pull request #25000 from staddy/master
Fixed typo in StreamTexture::is_pixel_opaque
Diffstat (limited to 'scene/resources/texture.cpp')
-rw-r--r--scene/resources/texture.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index d9ace8d650..4984af57b5 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -324,7 +324,7 @@ bool ImageTexture::is_pixel_opaque(int p_x, int p_y) const {
int y = p_y * ah / h;
x = CLAMP(x, 0, aw);
- y = CLAMP(y, 0, aw);
+ y = CLAMP(y, 0, ah);
return alpha_cache->get_bit(Point2(x, y));
}
@@ -791,7 +791,7 @@ bool StreamTexture::is_pixel_opaque(int p_x, int p_y) const {
int y = p_y * ah / h;
x = CLAMP(x, 0, aw);
- y = CLAMP(y, 0, aw);
+ y = CLAMP(y, 0, ah);
return alpha_cache->get_bit(Point2(x, y));
}