From 5e907327d66f43422dbf91e5463282eaee293837 Mon Sep 17 00:00:00 2001 From: timerix Date: Fri, 28 Oct 2022 12:09:24 +0600 Subject: [PATCH] fixed Array functions --- src/Array/Array_declare.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Array/Array_declare.h b/src/Array/Array_declare.h index 4f50f53..6d12ead 100644 --- a/src/Array/Array_declare.h +++ b/src/Array/Array_declare.h @@ -16,13 +16,13 @@ typedef struct Array_##type{\ \ static inline Array_##type Array_##type##_allocValues(uint32 length){\ return (Array_##type) {\ - .values=malloc(sizeof(type)*length),\ + .values=(type##*)malloc(sizeof(type)*length),\ .length=length,\ .allocatedOnHeap=true\ };\ }\ \ -static inline Array_##type Array_##type##_fromBuffer(buffer, bufferLength, allocatedOnHeap){\ +static inline Array_##type Array_##type##_fromBuffer(type##* buffer, uint32 bufferLength, bool allocatedOnHeap){\ return (Array_##type) {\ .values=buffer,\ .length=bufferLength,\