mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Fix assertion when using Texture.load_sub_image to load entire image
This commit is contained in:
parent
64a7fbab87
commit
d8066e19b1
@ -3441,8 +3441,8 @@ do_load_sub_image(CData *cdata, const PNMImage &image, int x, int y, int z, int
|
||||
nassertr(y >= 0 && y < tex_y_size, false);
|
||||
nassertr(z >= 0 && z < tex_z_size, false);
|
||||
|
||||
nassertr(image.get_x_size() + x < tex_x_size, false);
|
||||
nassertr(image.get_y_size() + y < tex_y_size, false);
|
||||
nassertr(image.get_x_size() + x <= tex_x_size, false);
|
||||
nassertr(image.get_y_size() + y <= tex_y_size, false);
|
||||
|
||||
// Flip y
|
||||
y = cdata->_y_size - (image.get_y_size() + y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user