Procházet zdrojové kódy

Fix assertion when using Texture.load_sub_image to load entire image

rdb před 8 roky
rodič
revize
d8066e19b1
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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(y >= 0 && y < tex_y_size, false);
   nassertr(z >= 0 && z < tex_z_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
   // Flip y
   y = cdata->_y_size - (image.get_y_size() + y);
   y = cdata->_y_size - (image.get_y_size() + y);