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-07 03:16:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-07 03:16:12 +0400
commit16ee427576608e3b04cef71909e4dbf2c2105034 (patch)
tree9bb0e6cc93e691fce73f513c83f64b734d5394ce /source/blender/makesrna
parentc27926896f4661f2764f96a1b5e2efd30820523c (diff)
rna_ParticleDupliWeight_name_length was returning an incorrect value. Zealous debug checks are testing the (buf[len] == '\0')
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_particle.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 8eb25290b18..f0f782fede2 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -691,14 +691,13 @@ static void rna_ParticleDupliWeight_active_index_set(struct PointerRNA *ptr, int
}
}
+static void rna_ParticleDupliWeight_name_get(PointerRNA *ptr, char *str);
+
static int rna_ParticleDupliWeight_name_length(PointerRNA *ptr)
{
- ParticleDupliWeight *dw= ptr->data;
-
- if(dw->ob)
- return strlen(dw->ob->id.name+2) + 7;
- else
- return 9 + 7;
+ char tstr[32];
+ rna_ParticleDupliWeight_name_get(ptr, tstr);
+ return strlen(tstr);
}
static void rna_ParticleDupliWeight_name_get(PointerRNA *ptr, char *str)