summaryrefslogtreecommitdiff
path: root/src/gfx_layout.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-06-30 07:29:31 +0000
committerrubidium <rubidium@openttd.org>2013-06-30 07:29:31 +0000
commit4fed658a63f53a14de7de6eb4372742ff5c231c3 (patch)
tree2d4884e888b56eef0c13fb152739497903cdb6ea /src/gfx_layout.cpp
parentea5d35a89651640afe73fe2d6af9b2c82a7f3134 (diff)
downloadopenttd-4fed658a63f53a14de7de6eb4372742ff5c231c3.tar.xz
(svn r25525) -Fix: off-by-one in fallback layout w.r.t. colour/font changes
Diffstat (limited to 'src/gfx_layout.cpp')
-rw-r--r--src/gfx_layout.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp
index 785f412e1..c8286a04b 100644
--- a/src/gfx_layout.cpp
+++ b/src/gfx_layout.cpp
@@ -307,7 +307,7 @@ ParagraphLayout::Line *ParagraphLayout::nextLine(int max_width)
}
const FontCache *fc = iter->second->fc;
- const WChar *next_run = this->buffer_begin + iter->first + 1;
+ const WChar *next_run = this->buffer_begin + iter->first;
for (;;) {
WChar c = *this->buffer++;
@@ -322,7 +322,7 @@ ParagraphLayout::Line *ParagraphLayout::nextLine(int max_width)
iter++;
assert(iter != this->runs.End());
- next_run = this->buffer_begin + iter->first + 1;
+ next_run = this->buffer_begin + iter->first;
begin = this->buffer;
last_char = begin;