Pass EvaluationContext argument everywhere
[blender.git] / source / blender / modifiers / intern / MOD_meshcache_mdd.c
index 0cbf07ca90720f889d7c0a46126c0f8e65b81420..3dd3a5fc59879d4b179e0da7720da9bdd209128a 100644 (file)
 
 #include "BLI_sys_types.h"
 #include "BLI_utildefines.h"
-#include "BLI_endian_switch.h"
 #include "BLI_fileops.h"
 #include "BLI_math.h"
+#ifdef __LITTLE_ENDIAN__
+#  include "BLI_endian_switch.h"
+#endif
+#ifdef WIN32
+#  include "BLI_winstuff.h"
+#endif
 
 #include "MOD_meshcache_util.h"  /* own include */
 
@@ -155,7 +160,7 @@ bool MOD_meshcache_read_mdd_index(FILE *fp,
                return false;
        }
 
-       if (fseek(fp, index * mdd_head.verts_tot * sizeof(float) * 3, SEEK_CUR) != 0) {
+       if (fseek(fp, sizeof(float) * 3 * index * mdd_head.verts_tot, SEEK_CUR) != 0) {
                *err_str = "Failed to seek frame";
                return false;
        }