elements icon indicating copy to clipboard operation
elements copied to clipboard

input_box bug

Open bizehao opened this issue 2 years ago • 2 comments

The input_box is There is a subscript out of bounds problem in https://github.com/cycfi/elements/blob/ae7b87a8cc53258fac7d1d5a7b96da2994116dcf/lib/src/element/text.cpp#L885 When entering the first words, the _select_end is 1, get_text() value size is 1,out of range.

Here are my changes:

basic_text_box::caret_metrics info; if (_select_end >= get_text().size()) {       caret_info(ctx, U""); } else {       caret_info(ctx, &get_text()[_select_end]); }

bizehao avatar Mar 20 '22 14:03 bizehao

Please file a PR. Thanks!

djowel avatar Mar 21 '22 02:03 djowel

ok,i will do it

bizehao avatar Mar 21 '22 04:03 bizehao

This is fixed and merged to head and develop branches.

djowel avatar Oct 21 '23 12:10 djowel