Changeset - r20504:ec88f633ae2b
[Not reviewed]
master
0 1 0
rubidium - 11 years ago 2013-06-30 07:29:31
rubidium@openttd.org
(svn r25525) -Fix: off-by-one in fallback layout w.r.t. colour/font changes
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/gfx_layout.cpp
Show inline comments
 
@@ -304,13 +304,13 @@ ParagraphLayout::Line *ParagraphLayout::
 
	while (iter->first <= offset) {
 
		iter++;
 
		assert(iter != this->runs.End());
 
	}
 

	
 
	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++;
 

	
 
		if (c == '\0') {
 
			this->buffer = NULL;
 
@@ -319,13 +319,13 @@ ParagraphLayout::Line *ParagraphLayout::
 

	
 
		if (this->buffer == next_run) {
 
			*l->Append() = new VisualRun(iter->second, begin, this->buffer - begin, l->getWidth());
 
			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;
 
			last_space = NULL;
 
		}
 

	
0 comments (0 inline, 0 general)