diff options
author | Ricardo Pérez <ricpelo@gmail.com> | 2015-05-05 22:27:05 +0200 |
---|---|---|
committer | Ricardo Pérez <ricpelo@gmail.com> | 2015-05-05 22:27:05 +0200 |
commit | 7bb53831d8aec2507f6341bd00deae29fde8e2c2 (patch) | |
tree | bf6ce42c3dfee2707f7b8adff072297603b59a23 /scene/gui/rich_text_label.cpp | |
parent | af068439829a3fec3a76c4c5d4dd2dba71ab6c5f (diff) | |
parent | bc3c14a76b988a50e65328a932316c2e630a7ae6 (diff) |
Merge pull request #6 from okamstudio/master
Sync
Diffstat (limited to 'scene/gui/rich_text_label.cpp')
-rw-r--r-- | scene/gui/rich_text_label.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 4be53839be..3489b02598 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -268,7 +268,9 @@ if (m_height > line_height) {\ } if (found_space) { - fw+=l.offset_caches[line]/l.space_caches[line]; + int ln = MIN(l.offset_caches.size()-1,line); + + fw+=l.offset_caches[ln]/l.space_caches[ln]; } } |