diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2017-10-10 18:29:56 +0200 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2017-10-10 18:29:56 +0200 |
commit | 14b9ad12969329e1c8f24afce0c674af3f97ae67 (patch) | |
tree | 6ef95471f6ec0665a01f0d5a6d06f500122d4622 | |
parent | 8ac43bb1de86202566e65dc96bddccd125e073be (diff) |
Fix wrong array index
-rw-r--r-- | modules/mono/mono_gd/gd_mono_marshal.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp index 7103dcee41..9a6c8f0cd6 100644 --- a/modules/mono/mono_gd/gd_mono_marshal.cpp +++ b/modules/mono/mono_gd/gd_mono_marshal.cpp @@ -705,9 +705,9 @@ MonoArray *PoolColorArray_to_mono_array(const PoolColorArray &p_array) { real_t *raw = (real_t *)mono_array_addr_with_size(ret, sizeof(real_t) * 4, i); const Color &elem = p_array[i]; raw[0] = elem.r; - raw[4] = elem.g; - raw[8] = elem.b; - raw[12] = elem.a; + raw[1] = elem.g; + raw[2] = elem.b; + raw[3] = elem.a; #endif } @@ -737,7 +737,7 @@ MonoArray *PoolVector2Array_to_mono_array(const PoolVector2Array &p_array) { real_t *raw = (real_t *)mono_array_addr_with_size(ret, sizeof(real_t) * 2, i); const Vector2 &elem = p_array[i]; raw[0] = elem.x; - raw[4] = elem.y; + raw[1] = elem.y; #endif } @@ -767,8 +767,8 @@ MonoArray *PoolVector3Array_to_mono_array(const PoolVector3Array &p_array) { real_t *raw = (real_t *)mono_array_addr_with_size(ret, sizeof(real_t) * 3, i); const Vector3 &elem = p_array[i]; raw[0] = elem.x; - raw[4] = elem.y; - raw[8] = elem.z; + raw[1] = elem.y; + raw[2] = elem.z; #endif } |