changeset 4819:f78414f9cadf draft

(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.
author Darkvater <Darkvater@openttd.org>
date Thu, 12 Oct 2006 10:14:45 +0000
parents d1176489b31f
children d4859bb444b3
files gfx.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gfx.c
+++ b/gfx.c
@@ -559,10 +559,10 @@
 			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;