replace fixed sizes with sizeof when passing string length since size wasn't always...
[blender.git] / source / blender / editors / space_view3d / view3d_buttons.c
index 3353030e29fb9c6cdffe50553517a6f87c753d33..985d70d21446579a1341c4ef80f27363987d203f 100644 (file)
@@ -188,7 +188,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
                                dg = BLI_findlink (&ob->defbase, dvert->dw[i].def_nr);
                                if(dg) {
                                        max+= BLI_snprintf(str, sizeof(str), "%s %%x%d|", dg->name, dvert->dw[i].def_nr); 
-                                       if(max<320) strcat(defstr, str);
+                                       if (max < sizeof(str)) strcat(defstr, str);
                                }
 
                                if(tfp->curdef==dvert->dw[i].def_nr) {