- apologies, made stupid newbie error in makesdna change (I'm blushing),

which majorly borked DNA and meant crashes everywhere. (C pointer
   arith, you know)
This commit is contained in:
Daniel Dunbar
2005-07-21 02:56:45 +00:00
parent e51f93b76c
commit 15f6ce46b1

View File

@@ -942,7 +942,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 - names[0]);
len= (long) (cp - (char*) names[0]);
len= (len+3) & ~3;
dna_write(file, names[0], len);
@@ -955,7 +955,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 - types[0]);
len= (long) (cp - (char*) types[0]);
len= (len+3) & ~3;
dna_write(file, types[0], len);
@@ -977,7 +977,7 @@ int make_structDNA(char *baseDirectory, FILE *file)
/* calc datablock size */
sp= structs[nr_structs-1];
sp+= 2+ 2*( sp[1] );
len= (long) (sp - structs[0]);
len= (long) ((char*) sp - (char*) structs[0]);
len= (len+3) & ~3;
dna_write(file, structs[0], len);