From 96f3533e463015cff0f81acfc31c20d2afcfbd6d Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 10 Mar 2018 18:52:16 +0100 Subject: [PATCH] Fix bug for default oplist used by M_A1_OPLIST o --- m-core.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/m-core.h b/m-core.h index 4d555afe..bc0e2d46 100644 --- a/m-core.h +++ b/m-core.h @@ -1583,11 +1583,11 @@ m_core_hash (const void *str, size_t length) if the variable is defined as a parameter of a function (sizeof (a) is not portable). */ #define M_MOVE_A1_DEFAULT(a,b) (M_MEMCPY_A1_DEFAULT(a, b), M_MEMSET_A1_DEFAULT(b)) -#define M_MEMCPY_A1_DEFAULT(a,b) (memcpy(&(a), &(b), sizeof (a[0]))) -#define M_MEMSET_A1_DEFAULT(a) (memset(&(a), 0, sizeof (a[0]))) -#define M_MEMCMP1_A1_DEFAULT(a,b) (memcmp(&(a), &(b), sizeof (a[0])) == 0) -#define M_MEMCMP2_A1_DEFAULT(a,b) (memcmp(&(a), &(b), sizeof (a[0]))) -#define M_HASH_A1_DEFAULT(a) (m_core_hash((const void*) &(a), sizeof (a[0])) ) +#define M_MEMCPY_A1_DEFAULT(a,b) (memcpy(&(a[0]), &(b[0]), sizeof (a[0]))) +#define M_MEMSET_A1_DEFAULT(a) (memset(&(a[0]), 0, sizeof (a[0]))) +#define M_MEMCMP1_A1_DEFAULT(a,b) (memcmp(&(a[0]), &(b[0]), sizeof (a[0])) == 0) +#define M_MEMCMP2_A1_DEFAULT(a,b) (memcmp(&(a[0]), &(b[0]), sizeof (a[0]))) +#define M_HASH_A1_DEFAULT(a) (m_core_hash((const void*) &(a[0]), sizeof (a[0])) ) /* Default oplist for plain structure */ #define M_POD_OPLIST \