Skip to content

Commit 265693b

Browse files
ivilxwq
andauthored
fix bug: Error in converting one-dimensional array to three-dimensional array (ArrayExtensions.To3DArray) (#441)
Co-authored-by: xwq <wqxu@i-con.cn>
1 parent 666a047 commit 265693b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libplctag/DataTypes/Extensions/ArrayExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public static T[] To1DArray<T>(this T[,,] input)
108108
{
109109
for (int k = 0; k < length; k++)
110110
{
111-
output[i, j, k] = input[i * height * width + j * width + k];
111+
output[i, j, k] = input[i * width * length + j * length + k];
112112
}
113113
}
114114
}

0 commit comments

Comments
 (0)