(svn r13699) -Fix: handle SETX(Y) properly when truncating a string instead of ignoring it and returning a too long string.
authorrubidium
Mon, 14 Jul 2008 17:31:41 +0000
changeset 9636 a70cb623e3e7
parent 9635 b00a9384a924
child 9637 4af6001e7fee
(svn r13699) -Fix: handle SETX(Y) properly when truncating a string instead of ignoring it and returning a too long string.
src/gfx.cpp
--- a/src/gfx.cpp	Sun Jul 13 19:44:05 2008 +0000
+++ b/src/gfx.cpp	Mon Jul 14 17:31:41 2008 +0000
@@ -262,9 +262,13 @@
 				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) {