diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2008-08-17 21:08:00 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2008-08-17 21:08:00 +0400 |
commit | fd0072e77cd28d52e00ea77542ba6d11018889b5 (patch) | |
tree | 6dc1858430424bac56898b0c6eaba05d062759ac /source/blender/makesdna/intern/makesdna.c | |
parent | 68765dc94bbb1bf924caa753d62d3f6029c60db5 (diff) |
Win64: please check my changes if you ran across them ;) But should be fine since no additional crashes were reported!
Diffstat (limited to 'source/blender/makesdna/intern/makesdna.c')
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 3818d66b39c..b4deb1f2b60 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -55,6 +55,8 @@ #include "MEM_guardedalloc.h" #include "DNA_sdna_types.h" +#include "BLO_sys_types.h" // for intptr_t support + #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -955,7 +957,7 @@ int make_structDNA(char *baseDirectory, FILE *file) /* calculate size of datablock with strings */ cp= names[nr_names-1]; cp+= strlen(names[nr_names-1]) + 1; /* +1: null-terminator */ - len= (long) (cp - (char*) names[0]); + len= (intptr_t) (cp - (char*) names[0]); len= (len+3) & ~3; dna_write(file, names[0], len); @@ -968,7 +970,7 @@ int make_structDNA(char *baseDirectory, FILE *file) /* calculate datablock size */ cp= types[nr_types-1]; cp+= strlen(types[nr_types-1]) + 1; /* +1: null-terminator */ - len= (long) (cp - (char*) types[0]); + len= (intptr_t) (cp - (char*) types[0]); len= (len+3) & ~3; dna_write(file, types[0], len); @@ -990,7 +992,7 @@ int make_structDNA(char *baseDirectory, FILE *file) /* calc datablock size */ sp= structs[nr_structs-1]; sp+= 2+ 2*( sp[1] ); - len= (long) ((char*) sp - (char*) structs[0]); + len= (intptr_t) ((char*) sp - (char*) structs[0]); len= (len+3) & ~3; dna_write(file, structs[0], len); |