From 8fc7e46afc51a32dd9c9808d284e57ac7948e87f Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Tue, 13 Nov 2012 23:13:18 -0500 Subject: [PATCH] Shifting by wrong data width in FusedDataArray --- SubstrateCS/Source/Core/FusedDataArray.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SubstrateCS/Source/Core/FusedDataArray.cs b/SubstrateCS/Source/Core/FusedDataArray.cs index d8b7f35..40d68c6 100644 --- a/SubstrateCS/Source/Core/FusedDataArray.cs +++ b/SubstrateCS/Source/Core/FusedDataArray.cs @@ -27,7 +27,7 @@ namespace Substrate.Core public int this[int x, int y, int z] { - get { return (_array0[x, y, z] << _array0.DataWidth) + _array1[x, y, z]; } + get { return (_array0[x, y, z] << _array1.DataWidth) + _array1[x, y, z]; } set { if (value >= (1 << _array1.DataWidth)) { @@ -66,7 +66,7 @@ namespace Substrate.Core public int this[int i] { - get { return (_array0[i] << _array0.DataWidth) + _array1[i]; } + get { return (_array0[i] << _array1.DataWidth) + _array1[i]; } set { if (value >= (1 << _array1.DataWidth)) {