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:
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index cf7c201795e..5ee48641d5b 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -1356,8 +1356,12 @@ void DNA_struct_switch_endian(const SDNA *oldsdna, int oldSDNAnr, char *data)
else {
/* non-struct field type */
if (ispointer(name)) {
- if (oldsdna->pointer_size == 8) {
- BLI_endian_switch_int64_array((int64_t *)cur, old_name_array_len);
+ /* See readfile.c (#bh4_from_bh8 swap endian argument),
+ * this is only done when reducing the size of a pointer from 4 to 8. */
+ if (sizeof(void *) < 8) {
+ if (oldsdna->pointer_size == 8) {
+ BLI_endian_switch_int64_array((int64_t *)cur, old_name_array_len);
+ }
}
}
else {