diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-06-01 17:10:37 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-06-01 17:10:37 +0400 |
commit | a180bfe26784a3be35476c4974f739c0baa28769 (patch) | |
tree | c71bcd6a09abd091d1c5a2537c68d1f46e441408 /source/blender/blenloader | |
parent | cc7a154fac6035a48b50c0e2fe944a6871a9098f (diff) |
Fix #27541: f-curve generator modifier file read missed endian switch,
found by Guillaume Roguez.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a10c7c6e1ed..6188ee143b2 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1723,6 +1723,7 @@ static void lib_link_fcurves(FileData *fd, ID *id, ListBase *list) static void direct_link_fmodifiers(FileData *fd, ListBase *list) { FModifier *fcm; + int a; for (fcm= list->first; fcm; fcm= fcm->next) { /* relink general data */ @@ -1736,6 +1737,11 @@ static void direct_link_fmodifiers(FileData *fd, ListBase *list) FMod_Generator *data= (FMod_Generator *)fcm->data; data->coefficients= newdataadr(fd, data->coefficients); + + if(fd->flags & FD_FLAGS_SWITCH_ENDIAN) { + for(a = 0; a < data->arraysize; a++) + SWITCH_INT(data->coefficients[a]); + } } break; case FMODIFIER_TYPE_ENVELOPE: |