From b38d93ab1382a2c2beca0c4f0b6af1f0797cfee6 Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Tue, 8 Sep 2020 13:19:28 +0000 Subject: [PATCH] common: Wrap ContainerOf around parentheses to allow direct struct access git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12916 d7cf8633-e32d-0410-b094-e92efae38249 --- common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.h b/common.h index 9d73bc548..b38f830d1 100644 --- a/common.h +++ b/common.h @@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //============================================================================ -#define ContainerOf(ptr, type, member) (type *)((void *)&(ptr) - offsetof(type, member)) +#define ContainerOf(ptr, type, member) ((type *)((void *)&(ptr) - offsetof(type, member))) typedef struct sizebuf_s {