enforce string limits (reported by pedantic checking tools & some developers).

mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf().
also fix possible crash if CWD isnt available.
This commit is contained in:
2011-02-13 03:21:27 +00:00
parent 9e03a0d476
commit 867fc4b463
49 changed files with 201 additions and 239 deletions

View File

@@ -128,11 +128,10 @@ static void createFacepa(ExplodeModifierData *emd,
/* set protected verts */
if(emd->vgroup){
MDeformVert *dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
float val;
if(dvert){
int defgrp_index= emd->vgroup-1;
const int defgrp_index= emd->vgroup-1;
for(i=0; i<totvert; i++, dvert++){
val = BLI_frand();
float val = BLI_frand();
val = (1.0f-emd->protect)*val + emd->protect*0.5f;
if(val < defvert_find_weight(dvert, defgrp_index))
vertpa[i] = -1;