diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-09 10:03:38 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-09 10:03:38 +0400 |
commit | 8714fb7019e853703ce8b102edac43d84b7bbe14 (patch) | |
tree | ef8993afe8cfdecf21ddead6b4c1c4152bc084f5 /source/blender/makesrna/intern | |
parent | 6778f7ae056bcf529820ea3fc8238dda0473eb33 (diff) |
replace sprintf with strcpy where no formatting is done and return value isn't used.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_fluidsim.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c index 82911ebb3be..ba90aca47a3 100644 --- a/source/blender/makesrna/intern/rna_fluidsim.c +++ b/source/blender/makesrna/intern/rna_fluidsim.c @@ -141,12 +141,12 @@ static void rna_FluidSettings_update_type(Main *bmain, Scene *scene, PointerRNA psys->part= part; psys->pointcache= BKE_ptcache_add(&psys->ptcaches); psys->flag |= PSYS_ENABLED; - sprintf(psys->name, "FluidParticles"); + BLI_strncpy(psys->name, "FluidParticles", sizeof(psys->name)); BLI_addtail(&ob->particlesystem,psys); /* add modifier */ psmd= (ParticleSystemModifierData*)modifier_new(eModifierType_ParticleSystem); - sprintf(psmd->modifier.name, "FluidParticleSystem" ); + BLI_strncpy(psmd->modifier.name, "FluidParticleSystem", sizeof(psmd->modifier.name)); psmd->psys= psys; BLI_addtail(&ob->modifiers, psmd); modifier_unique_name(&ob->modifiers, (ModifierData *)psmd); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 5259ee1f6d1..f7d1b5d20cf 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -275,7 +275,7 @@ static void rna_Smoke_set_type(Main *bmain, Scene *scene, PointerRNA *ptr) part->end = 250.0f; part->ren_as = PART_DRAW_NOT; part->draw_as = PART_DRAW_DOT; - sprintf(psys->name, "SmokeParticles"); + BLI_strncpy(psys->name, "SmokeParticles", sizeof(psys->name)); psys->recalc |= (PSYS_RECALC_RESET|PSYS_RECALC_PHYS); DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } |