From 41f4068a6e81f5f0e94428ddc04330f6a154ee70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Fertyk?= Date: Sun, 6 Nov 2022 13:02:16 +0100 Subject: Fix RichTextLabel crash with out of bound exception Fixes #68242. (cherry picked from commit 44592c8c197b072d5beee3f14c9c6869a94e9671) --- scene/gui/rich_text_label.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/gui') diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 44478d45cc..ec1fbb7e28 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2375,7 +2375,7 @@ int RichTextLabel::_find_list(Item *p_item, Vector &r_index, Vectorline + 1; i <= prev_item->line; i++) { + for (int i = list->line + 1; i <= prev_item->line && i < (int)frame->lines.size(); i++) { if (_find_list_item(frame->lines[i].from) == list) { index++; } -- cgit v1.2.3