Fix is_pixel_opaque bound checks.

This commit is contained in:
Pāvels Nadtočajevs 2025-04-19 12:51:59 +03:00
parent 2d3bdcac35
commit f3d3bf9d03
No known key found for this signature in database
GPG key ID: 8413210218EF35D2
3 changed files with 6 additions and 6 deletions

View file

@ -197,8 +197,8 @@ bool ImageTexture::is_pixel_opaque(int p_x, int p_y) const {
int x = p_x * aw / w;
int y = p_y * ah / h;
x = CLAMP(x, 0, aw);
y = CLAMP(y, 0, ah);
x = CLAMP(x, 0, aw - 1);
y = CLAMP(y, 0, ah - 1);
return alpha_cache->get_bit(x, y);
}