Fix T63164: DNA size mismatches on 32bit, causing memory corruption and crashes.

Some alignment rules from Visual Studion on 32 bit are not taken into
account, this fixes the structs to confirm. We now have static asserts
to catch when such breakage happens in the future.
This commit is contained in:
Brecht Van Lommel
2019-04-02 15:56:16 +02:00
parent b0037cd0b4
commit 4f4cea727e
3 changed files with 3 additions and 0 deletions

View File

@@ -201,6 +201,7 @@ typedef struct bGPDstroke {
/** Vertex weight data. */
struct MDeformVert *dvert;
void *_pad3;
bGPDstroke_Runtime runtime;
char _pad2[4];

View File

@@ -189,6 +189,7 @@ typedef struct Mesh {
/** Deprecated multiresolution modeling data, only keep for loading old files. */
struct Multires *mr DNA_DEPRECATED;
void *_pad1;
Mesh_Runtime runtime;
} Mesh;

View File

@@ -170,6 +170,7 @@ typedef struct Object_Runtime {
struct ObjectBBoneDeform *cached_bbone_deformation;
void *_pad1;
} Object_Runtime;
typedef struct Object {