mirror of https://github.com/OpenTTD/OpenTTD
(svn r6743) -Fix (r6462): When determining string length for GetStringBoundingBox SETX and
SETXY parameters were wrongly accounted for. The identifier itself was taken not the amount.release/0.5
parent
5df31095f7
commit
7147c83bcc
6
gfx.c
6
gfx.c
|
@ -559,10 +559,10 @@ BoundingRect GetStringBoundingBox(const char *str)
|
||||||
br.width += GetCharacterWidth(size, c);
|
br.width += GetCharacterWidth(size, c);
|
||||||
} else {
|
} else {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case ASCII_SETX: br.width += (byte)*str++; break;
|
case ASCII_SETX: br.width += (byte)*++str; break;
|
||||||
case ASCII_SETXY:
|
case ASCII_SETXY:
|
||||||
br.width += (byte)*str++;
|
br.width += (byte)*++str;
|
||||||
br.height += (byte)*str++;
|
br.height += (byte)*++str;
|
||||||
break;
|
break;
|
||||||
case ASCII_TINYFONT: size = FS_SMALL; break;
|
case ASCII_TINYFONT: size = FS_SMALL; break;
|
||||||
case ASCII_BIGFONT: size = FS_LARGE; break;
|
case ASCII_BIGFONT: size = FS_LARGE; break;
|
||||||
|
|
Loading…
Reference in New Issue