Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-10-09 10:03:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-09 10:03:38 +0400
commit8714fb7019e853703ce8b102edac43d84b7bbe14 (patch)
treeef8993afe8cfdecf21ddead6b4c1c4152bc084f5 /source/blender/makesrna
parent6778f7ae056bcf529820ea3fc8238dda0473eb33 (diff)
replace sprintf with strcpy where no formatting is done and return value isn't used.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c4
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c2
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);
}