summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-09-27 19:29:04 +0200
committerTyge Løvset <[email protected]>2022-09-27 19:29:04 +0200
commit0f755b3ba05dd629bd56f1b356c1bcc2214222a9 (patch)
treef9253afbb3c71d777f4690d38906b347a474d766 /include
parent57bd093b76083de23af1cfa40be16d166cd440fe (diff)
downloadSTC-modified-0f755b3ba05dd629bd56f1b356c1bcc2214222a9.tar.gz
STC-modified-0f755b3ba05dd629bd56f1b356c1bcc2214222a9.zip
Missing paranthesis in c_new().
Diffstat (limited to 'include')
-rw-r--r--include/stc/ccommon.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/stc/ccommon.h b/include/stc/ccommon.h
index 2e84633c..bae0b68f 100644
--- a/include/stc/ccommon.h
+++ b/include/stc/ccommon.h
@@ -68,7 +68,7 @@
# define c_alloc(T) c_malloc(sizeof(T))
# define c_alloc_n(T, n) c_malloc(sizeof(T)*(n))
# define c_make(T) (T)
-# define c_new(T, ...) (T*)memcpy(c_alloc(T), (T[]){__VA_ARGS__}, sizeof(T))
+# define c_new(T, ...) ((T*)memcpy(c_alloc(T), (T[]){__VA_ARGS__}, sizeof(T)))
#else
# include <new>
# define c_alloc(T) static_cast<T*>(c_malloc(sizeof(T)))