From b3b89f63af148031817c046ba8023b76241c1e7c Mon Sep 17 00:00:00 2001 From: Alex Sakhartchouk Date: Wed, 29 Dec 2010 08:43:49 -0800 Subject: Fixing a bug in the load function. Change-Id: Ie5e72836dec7f77d42c8cb9afb8c3d5591ff35a7 --- graphics/java/android/renderscript/Matrix2f.java | 2 +- graphics/java/android/renderscript/Matrix3f.java | 2 +- graphics/java/android/renderscript/Matrix4f.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/graphics/java/android/renderscript/Matrix2f.java b/graphics/java/android/renderscript/Matrix2f.java index 6ce8379..6aa7d1b 100644 --- a/graphics/java/android/renderscript/Matrix2f.java +++ b/graphics/java/android/renderscript/Matrix2f.java @@ -57,7 +57,7 @@ public class Matrix2f { } public void load(Matrix2f src) { - System.arraycopy(mMat, 0, src.getArray(), 0, 4); + System.arraycopy(src.getArray(), 0, mMat, 0, mMat.length); } public void loadRotate(float rot) { diff --git a/graphics/java/android/renderscript/Matrix3f.java b/graphics/java/android/renderscript/Matrix3f.java index b44d8fa..2d227a5 100644 --- a/graphics/java/android/renderscript/Matrix3f.java +++ b/graphics/java/android/renderscript/Matrix3f.java @@ -63,7 +63,7 @@ public class Matrix3f { } public void load(Matrix3f src) { - System.arraycopy(mMat, 0, src.getArray(), 0, 9); + System.arraycopy(src.getArray(), 0, mMat, 0, mMat.length); } public void loadRotate(float rot, float x, float y, float z) { diff --git a/graphics/java/android/renderscript/Matrix4f.java b/graphics/java/android/renderscript/Matrix4f.java index 219d93b..144a9a3 100644 --- a/graphics/java/android/renderscript/Matrix4f.java +++ b/graphics/java/android/renderscript/Matrix4f.java @@ -71,7 +71,7 @@ public class Matrix4f { } public void load(Matrix4f src) { - System.arraycopy(mMat, 0, src.getArray(), 0, 16); + System.arraycopy(src.getArray(), 0, mMat, 0, mMat.length); } public void loadRotate(float rot, float x, float y, float z) { -- cgit v1.1