- fix for error with utf8 textinput for buttons
[blender.git] / source / blender / editors / interface / interface_handlers.c
index 79080eb5f3bb6a33541ccd9425dd5672e997eaa5..9f77317292c5167c46284b27a4b595a25b483505 100644 (file)
@@ -1447,7 +1447,7 @@ static int ui_textedit_type_utf8(uiBut *but, uiHandleButtonData *data, const cha
        len= strlen(str);
 
        if(len-(but->selend - but->selsta)+1 <= data->maxlen) {
-               int step= BLI_strnlen(utf8_buf, sizeof(utf8_buf));
+               int step= BLI_str_utf8_size(utf8_buf);
 
                /* type over the current selection */
                if ((but->selend - but->selsta) > 0) {