summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2018-06-16 00:35:12 +0200
committerMichael Lutz <michi@icosahedron.de>2018-06-16 11:04:03 +0200
commit574f547aca42c5c712de98fb424258d45a3ef6df (patch)
treebce1c14b4684d3ec9712fdbd8980d0814e20b363 /src
parent5ab06ef8a3a5291ddc9bbee7f73f04bd077272e0 (diff)
downloadopenttd-574f547aca42c5c712de98fb424258d45a3ef6df.tar.xz
Fix 768a31b: When cascading to another text layouter, clear the old font run state left over from the previous (failed) layout attempt.
Diffstat (limited to 'src')
-rw-r--r--src/gfx_layout.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp
index 1d9fc7c31..0a9f5a0b1 100644
--- a/src/gfx_layout.cpp
+++ b/src/gfx_layout.cpp
@@ -597,6 +597,7 @@ static inline void GetLayouter(Layouter::LineCacheItem &line, const char *&str,
Font *f = Layouter::GetFont(state.fontsize, state.cur_colour);
line.buffer = buff_begin;
+ fontMapping.Clear();
/*
* Go through the whole string while adding Font instances to the font map