From 7d2d0bdc7524516573b8c9d12094a4570aa2ac97 Mon Sep 17 00:00:00 2001 From: "bre..ns" Date: Tue, 13 Dec 2011 17:51:09 +0000 Subject: [PATCH] fixed arraycopy buffer overflow error for Shorts in AWTLoader git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8916 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/desktop/com/jme3/texture/plugins/AWTLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/desktop/com/jme3/texture/plugins/AWTLoader.java b/engine/src/desktop/com/jme3/texture/plugins/AWTLoader.java index b5dd32b0b..3f471f70b 100644 --- a/engine/src/desktop/com/jme3/texture/plugins/AWTLoader.java +++ b/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){ int scSz = (width * bpp) / 8; scSz /= 2; // Because shorts are 2 bytes - byte[] sln = new byte[scSz]; + short[] sln = new short[scSz]; int y2 = 0; for (int y1 = 0; y1 < height / 2; y1++){ y2 = height - y1 - 1;