Przeglądaj źródła

Fix assertion when using Texture.load_sub_image to load entire image

rdb 8 lat temu
rodzic
commit
d8066e19b1
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      panda/src/gobj/texture.cxx

+ 2 - 2
panda/src/gobj/texture.cxx

@@ -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);