From 2bb7d795b7bb7b4d7062ae36cd894d8a586f2fd2 Mon Sep 17 00:00:00 2001 From: gambas Date: Wed, 20 Mar 2019 19:39:56 +0100 Subject: [PATCH] Fix Array.Shuffle() on String, Long and Object arrays. [INTERPRETER] * BUG: Fix Array.Shuffle() on String, Long and Object arrays. --- main/gbx/gbx_c_array.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/gbx/gbx_c_array.c b/main/gbx/gbx_c_array.c index accf3c2ec..a6888018b 100644 --- a/main/gbx/gbx_c_array.c +++ b/main/gbx/gbx_c_array.c @@ -823,9 +823,9 @@ BEGIN_METHOD_VOID(Array_Shuffle) __SWAP_LONG: { - int64_t t = *(char *)p1; - *(char *)p1 = *(char *)p2; - *(char *)p2 = t; + int64_t t = *(int64_t *)p1; + *(int64_t *)p1 = *(int64_t *)p2; + *(int64_t *)p2 = t; continue; }