Fix wrong buffer size passed to snprintf, use BLI_snprintf
Also remove redundant call to snprintf.
This commit is contained in:
@@ -571,7 +571,6 @@ static void nla_fmodifier_panel_id(void *fcm_link, char *r_name)
|
||||
{
|
||||
FModifier *fcm = (FModifier *)fcm_link;
|
||||
eFModifier_Types type = fcm->type;
|
||||
snprintf(r_name, BKE_ST_MAXNAME, "%s_PT_", NLA_FMODIFIER_PANEL_PREFIX);
|
||||
const FModifierTypeInfo *fmi = get_fmodifier_typeinfo(type);
|
||||
BLI_snprintf(r_name, BKE_ST_MAXNAME, "%s_PT_%s", NLA_FMODIFIER_PANEL_PREFIX, fmi->name);
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel)
|
||||
|
||||
int decimate_type = RNA_enum_get(ptr, "decimate_type");
|
||||
char count_info[64];
|
||||
snprintf(count_info, 32, TIP_("Face Count: %d"), RNA_int_get(ptr, "face_count"));
|
||||
SNPRINTF(count_info, TIP_("Face Count: %d"), RNA_int_get(ptr, "face_count"));
|
||||
|
||||
uiItemR(layout, ptr, "decimate_type", UI_ITEM_R_EXPAND, nullptr, ICON_NONE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user