Fix warnings in RNA, one being an actual bug in setting an object's layer.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 5 Nov 2009 17:28:10 +0000 (17:28 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 5 Nov 2009 17:28:10 +0000 (17:28 +0000)
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_particle.c

index c7a1284e35e177483a344052c9c83c7bcd2415af..a5ec30bd624e70498e641535dc5e0e2a61654e64 100644 (file)
@@ -739,7 +739,7 @@ static PointerRNA rna_Object_game_settings_get(PointerRNA *ptr)
 
 static unsigned int rna_Object_layer_validate__internal(const int *values, unsigned int lay)
 {
-       int i, tot;
+       int i, tot= 0;
 
        /* ensure we always have some layer selected */
        for(i=0; i<20; i++)
index a70a5572ef055ab5c32021c858a03104d241d072..ad73f279b453fdb8c8918bfc9342f3b10ca16ab9 100644 (file)
@@ -593,7 +593,7 @@ static void psys_vg_name_set__internal(PointerRNA *ptr, const char *value, int i
                psys->vgroup[index]= 0;
        }
        else {
-               int vgroup_num = get_named_vertexgroup_num(ob, value);
+               int vgroup_num = get_named_vertexgroup_num(ob, (char*)value);
 
                if(vgroup_num == -1)
                        return;