diff --git a/stdlib/arr.sl b/stdlib/arr.sl index 5ac29e6..e23eef5 100644 --- a/stdlib/arr.sl +++ b/stdlib/arr.sl @@ -13,7 +13,7 @@ import mem.sl #arr_to_dyn [* | std_arr] -> [* | dyn_arr] word arr_to_dyn - dup @ dup dup 3 + alloc dup rot ! + dup @ dup dup 2 * 3 + alloc dup rot ! dup rot 2 * swap 8 + swap ! dup 16 + dup 8 + dup -rot ! 0 swap 3 pick dup @ 8 * swap 8 + swap memcpy 2drop drop nip @@ -125,4 +125,4 @@ end # Set element at index i to x word arr_set arr_data swap 8 * + swap ! -end \ No newline at end of file +end