From c9ed4ba8201cb6f0ccfb760aa4d31628643295b5 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 10 Jan 2021 18:01:19 +0100 Subject: [PATCH] Fix compiler error with MSVC with new implementation of offsetof --- m-core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m-core.h b/m-core.h index 1a6d1aca..1ae2ccc3 100644 --- a/m-core.h +++ b/m-core.h @@ -2040,7 +2040,7 @@ M_PARSE_DEFAULT_TYPE_DEF(m_core_parse_ldouble, long double, strtold, ) ((type *)(void*)( (char *)M_ASSIGN_CAST(field_type*, (ptr)) - offsetof(type, field) )) #define M_CTYPE_FROM_FIELD(type, ptr, field_type, field) \ - ((type const *)(const void*)( (const char *)M_ASSIGN_CAST(field_type const *, (ptr)) - offsetof(type const, field) )) + ((type const *)(const void*)( (const char *)M_ASSIGN_CAST(field_type const *, (ptr)) - offsetof(type, field) )) /* Use to generate a dummy alignment field for cache alignment within a structure