Fix menu operator/search clipping the last character

Noted in T77504
This commit is contained in:
Campbell Barton 2020-06-09 19:23:17 +10:00 committed by Jeroen Bakker
parent 5439f43e88
commit f649e5c418
Notes: blender-bot 2023-02-14 09:21:21 +01:00
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ bool ui_searchbox_apply(uiBut *but, ARegion *region)
const char *name = data->items.names[data->active];
const char *name_sep = data->use_sep ? strrchr(name, UI_SEP_CHAR) : NULL;
BLI_strncpy(but->editstr, name, name_sep ? (name_sep - name) : data->items.maxstrlen);
BLI_strncpy(but->editstr, name, name_sep ? (name_sep - name) + 1 : data->items.maxstrlen);
but->func_arg2 = data->items.pointers[data->active];