misc_gui.c
changeset 1329 a8a0d60b0a8e
parent 1323 41397685320a
child 1336 c9e6b766bf21
--- a/misc_gui.c	Sun Feb 06 20:53:31 2005 +0000
+++ b/misc_gui.c	Sun Feb 06 22:25:27 2005 +0000
@@ -678,7 +678,7 @@
 static void DrawStationCoverageText(const uint *accepts, int str_x, int str_y, uint mask)
 {
 	int i;
-	byte *b;
+	char *b;
 
 	b = _userstring;
 	b[0] = 0x81;
@@ -698,7 +698,7 @@
 		}
 	}
 
-	if (b == (byte*)&_userstring[3]) {
+	if (b == &_userstring[3]) {
 		b[0] = 0x81;
 		b[1] = STR_00D0_NOTHING;
 		b[2] = STR_00D0_NOTHING >> 8;
@@ -779,7 +779,7 @@
  * [IN]buf: string to be checked
  * [OUT]count: gets set to the count of characters
  * [OUT]width: gets set to the pixels width */
-static void GetCurrentStringSize(const byte *buf, int *count, int *width)
+static void GetCurrentStringSize(const char *buf, int *count, int *width)
 {
 	*count = 0;
 	*width = -1;
@@ -788,7 +788,7 @@
 		if (*++buf == 0)
 			break;
 		(*count)++;
-		(*width) += _stringwidth_table[*buf - 32];
+		(*width) += _stringwidth_table[(byte)*buf - 32];
 	} while (1);
 }