diff options
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 214fcfa2389..e3fa591a60f 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2684,15 +2684,7 @@ static void uilist_filter_items_default(struct uiList *ui_list, struct bContext else { filter = filter_dyn = MEM_mallocN((slen + 3) * sizeof(char), "filter_dyn"); } - if (filter_raw[idx] != '*') { - filter[idx++] = '*'; - } - memcpy(filter + idx, filter_raw, slen); - idx += slen; - if (filter[idx - 1] != '*') { - filter[idx++] = '*'; - } - filter[idx] = '\0'; + BLI_strncpy_ensure_pad(filter, filter_raw, '*', slen + 3); } RNA_PROP_BEGIN (dataptr, itemptr, prop) |