Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-02-05 18:24:29 +0300
committerJacques Lucke <jacques@blender.org>2021-02-05 18:24:46 +0300
commita0867f05a48e2017a3b634cda5471c015af5bf35 (patch)
tree6be7ec0aadd3f7efa34c902578ce4be0f84b1734 /source/blender/makesdna/intern
parente8a5744cdab0df49fe9e86170b776c3708c20b00 (diff)
DNA: support structs with a size of 1 or 2 bytes.
Before the smallest possible dna struct size was 4 bytes. Differential Revision: https://developer.blender.org/D10287
Diffstat (limited to 'source/blender/makesdna/intern')
-rw-r--r--source/blender/makesdna/intern/makesdna.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 843e6935416..7624649bf78 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -1074,7 +1074,7 @@ static int calculate_struct_sizes(int firststruct, FILE *file_verify, const char
}
}
- if (size_native % 4) {
+ if (size_native % 4 && !ELEM(size_native, 1, 2)) {
fprintf(stderr,
"Sizeerror 4 in struct: %s (add %d bytes)\n",
types[structtype],