From 8714fb7019e853703ce8b102edac43d84b7bbe14 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 9 Oct 2011 06:03:38 +0000 Subject: replace sprintf with strcpy where no formatting is done and return value isn't used. --- source/blender/makesrna/intern/rna_fluidsim.c | 4 ++-- source/blender/makesrna/intern/rna_modifier.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna') 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); } -- cgit v1.2.3