Explorar el Código

fixed arraycopy buffer overflow error for Shorts in AWTLoader

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8916 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
bre..ns hace 14 años
padre
commit
7d2d0bdc75
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      engine/src/desktop/com/jme3/texture/plugins/AWTLoader.java

+ 1 - 1
engine/src/desktop/com/jme3/texture/plugins/AWTLoader.java

@@ -90,7 +90,7 @@ public class AWTLoader implements AssetLoader {
     private void flipImage(short[] img, int width, int height, int bpp){
     private void flipImage(short[] img, int width, int height, int bpp){
         int scSz = (width * bpp) / 8;
         int scSz = (width * bpp) / 8;
         scSz /= 2; // Because shorts are 2 bytes
         scSz /= 2; // Because shorts are 2 bytes
-        byte[] sln = new byte[scSz];
+        short[] sln = new short[scSz];
         int y2 = 0;
         int y2 = 0;
         for (int y1 = 0; y1 < height / 2; y1++){
         for (int y1 = 0; y1 < height / 2; y1++){
             y2 = height - y1 - 1;
             y2 = height - y1 - 1;