Browse Source

Fixed length of data array for uv data.

Daniel Kauth 11 years ago
parent
commit
c787596441
1 changed files with 2 additions and 2 deletions
  1. 2 2
      bbiwarg/DataSource/IisuDataSource.cs

+ 2 - 2
bbiwarg/DataSource/IisuDataSource.cs

@@ -187,8 +187,8 @@ namespace bbiwarg.DataSource
 
             IntPtr imageData = uvImage.Value.Raw;
 
-            float[] uvData = new float[width * height];
-            Marshal.Copy(imageData, uvData, 0, width * height);
+            float[] uvData = new float[2 * width * height];
+            Marshal.Copy(imageData, uvData, 0, 2 * width * height);
 
             return new UVImage(width, height, uvData);
         }