mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r13699) -Fix: handle SETX(Y) properly when truncating a string instead of ignoring it and returning a too long string.
This commit is contained in:
parent
1c17405721
commit
b7c69ba5f0
10
src/gfx.cpp
10
src/gfx.cpp
|
@ -262,9 +262,13 @@ static int TruncateString(char *str, int maxw)
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue