fix(bidi): fix weak letter dir wrong change (#4946)

Signed-off-by: yushuailong1 <yushuailong1@xiaomi.com>
Co-authored-by: yushuailong1 <yushuailong1@xiaomi.com>
This commit is contained in:
yushuailong
2023-12-06 21:47:33 +08:00
committed by GitHub
parent 450d81a856
commit 502fc82435

View File

@@ -257,7 +257,7 @@ void _lv_bidi_process_paragraph(const char * str_in, char * str_out, uint32_t le
else if(dir != LV_BASE_DIR_WEAK) break;
}
if(rd && str_in[rd] != '\0') {
if(rd && str_in[rd] != '\0' && rd < len) {
_lv_text_encoded_prev(str_in, &rd);
pos_conv_rd--;
}