summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-18 19:47:43 +0000
committerrubidium <rubidium@openttd.org>2013-11-18 19:47:43 +0000
commit5b3d3b72403f5d2e3d9ee0c284cf4ee3b7ec189f (patch)
treee50870434935aec47272538bcc3f18174b0e99b4
parenta36fb735c06c8ee58aa642e8298e7377a18c466c (diff)
downloadopenttd-5b3d3b72403f5d2e3d9ee0c284cf4ee3b7ec189f.tar.xz
(svn r26037) -Fix (r26036): there was a reason they weren't references...
-rw-r--r--src/gfx_layout.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp
index 6a3d1ee96..0c4c1f23f 100644
--- a/src/gfx_layout.cpp
+++ b/src/gfx_layout.cpp
@@ -653,6 +653,9 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi
} else {
/* Line is new, layout it */
#ifdef WITH_ICU
+ FontState old_state = state;
+ const char *old_str = str;
+
GetLayouter<ICUParagraphLayout>(line, str, state);
if (line.layout == NULL) {
static bool warned = false;
@@ -660,6 +663,9 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi
DEBUG(misc, 0, "ICU layouter bailed on the font. Falling back to the fallback layouter");
warned = true;
}
+
+ state = old_state;
+ str = old_str;
GetLayouter<FallbackParagraphLayout>(line, str, state);
}
#else