From 2416635ba33c217c3045540b24b6fdd3876343fe Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 14 Jan 2024 15:43:02 +0300 Subject: [PATCH] common: validate extended surfaces size --- common/com_model.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/com_model.h b/common/com_model.h index 22d52243..5f4b70c0 100644 --- a/common/com_model.h +++ b/common/com_model.h @@ -534,5 +534,14 @@ typedef struct #define MAX_EFRAGS 8192 // Arcane Dimensions required #define MAX_REQUESTS 64 +#if ! XASH_64BIT +STATIC_ASSERT( sizeof( mextrasurf_t ) == 324, "mextrasurf_t unexpected size" ); +STATIC_ASSERT( sizeof( decal_t ) == 60, "decal_t unexpected size"); +STATIC_ASSERT( sizeof( mfaceinfo_t ) == 176, "mfaceinfo_t unexpected size"); +#else +STATIC_ASSERT( sizeof( mextrasurf_t) == 496, "mextrasurf_t unexpected size"); +STATIC_ASSERT( sizeof( decal_t ) == 88, "decal_t unexpected size"); +STATIC_ASSERT( sizeof( mfaceinfo_t ) == 304, "mfaceinfo_t unexpected size"); +#endif #endif//COM_MODEL_H