Changeset - r9636:09a3cb397fa4
[Not reviewed]
master
0 1 0
rubidium - 16 years ago 2008-07-14 17:31:41
rubidium@openttd.org
(svn r13699) -Fix: handle SETX(Y) properly when truncating a string instead of ignoring it and returning a too long string.
1 file changed with 7 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/gfx.cpp
Show inline comments
 
@@ -262,9 +262,13 @@ static int TruncateString(char *str, int
 
				return ddd_w;
 
			}
 
		} else {
 
			if (c == SCC_SETX) str++;
 
			else if (c == SCC_SETXY) str += 2;
 
			else if (c == SCC_TINYFONT) {
 
			if (c == SCC_SETX) {
 
				w = *str;
 
				str++;
 
			} else if (c == SCC_SETXY) {
 
				w = *str;
 
				str += 2;
 
			} else if (c == SCC_TINYFONT) {
 
				size = FS_SMALL;
 
				ddd = GetCharacterWidth(size, '.') * 3;
 
			} else if (c == SCC_BIGFONT) {
0 comments (0 inline, 0 general)