diff options
Diffstat (limited to 'source/blender/makesdna/intern/dna_genfile.c')
-rw-r--r-- | source/blender/makesdna/intern/dna_genfile.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index f04d7ca5fe9..808bef68d2a 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -492,7 +492,8 @@ static bool init_structDNA( /* this is a patch, to change struct names without a conflict with SDNA */ /* be careful to use it, in this case for a system-struct (opengl/X) */ - /* struct Screen was already used by X, 'bScreen' replaces the old IrisGL 'Screen' struct */ + /* struct Screen was already used by X, + * 'bScreen' replaces the old IrisGL 'Screen' struct */ if (strcmp("bScreen", cp) == 0) { sdna->types[nr] = cp + 1; } @@ -844,7 +845,8 @@ static eSDNA_Type sdna_type_nr(const char *dna_type) else if ( strcmp(dna_type, "double") == 0) return SDNA_TYPE_DOUBLE; else if ( strcmp(dna_type, "int64_t") == 0) return SDNA_TYPE_INT64; else if ( strcmp(dna_type, "uint64_t") == 0) return SDNA_TYPE_UINT64; - else return -1; /* invalid! */ + /* invalid! */ + else return -1; } /** @@ -1155,8 +1157,11 @@ static void reconstruct_elem( curdata, olddata); } else if (strcmp(type, otype) == 0) { /* type equal */ - mul = len / oldsize; /* size of single old array element */ - mul *= (cursize < oldsize) ? cursize : oldsize; /* smaller of sizes of old and new arrays */ + /* size of single old array element */ + mul = len / oldsize; + /* smaller of sizes of old and new arrays */ + mul *= (cursize < oldsize) ? cursize : oldsize; + memcpy(curdata, olddata, mul); if (oldsize > cursize && strcmp(type, "char") == 0) { |