Merge pull request #51974 from anazr9/godot-3.x-fixes

Fixed Crash with RichTextLabel [fill] tag #51968
This commit is contained in:
Michael Alexsander 2021-08-22 13:40:51 +00:00 committed by GitHub
commit c62399557a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -447,7 +447,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
fh = line_ascent + line_descent;
if (end && c[end - 1] == ' ') {
if (align == ALIGN_FILL) {
if (align == ALIGN_FILL && p_mode != PROCESS_CACHE) {
int ln = MIN(l.offset_caches.size() - 1, line);
if (l.space_caches[ln]) {
align_ofs = spaces * l.offset_caches[ln] / l.space_caches[ln];