diff options
author | Darkvater <Darkvater@openttd.org> | 2006-10-12 10:14:45 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2006-10-12 10:14:45 +0000 |
commit | e19ee43f7f0bffb9c388d900081a86e3eec34215 (patch) | |
tree | 0d086cd986ee78fb8acc5b283b061c7cdf6ac2ca /gfx.c | |
parent | 71bac6662b0c3bfd5b764814b99802897a8a8d51 (diff) | |
download | openttd-e19ee43f7f0bffb9c388d900081a86e3eec34215.tar.xz |
(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.
Diffstat (limited to 'gfx.c')
-rw-r--r-- | gfx.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -559,10 +559,10 @@ BoundingRect GetStringBoundingBox(const char *str) br.width += GetCharacterWidth(size, c); } else { switch (c) { - case ASCII_SETX: br.width += (byte)*str++; break; + case ASCII_SETX: br.width += (byte)*++str; break; case ASCII_SETXY: - br.width += (byte)*str++; - br.height += (byte)*str++; + br.width += (byte)*++str; + br.height += (byte)*++str; break; case ASCII_TINYFONT: size = FS_SMALL; break; case ASCII_BIGFONT: size = FS_LARGE; break; |