(svn r9108) -Fix(9093) : MSVC was a bit unhappy with some of the type changes. So basically, widening the types makes the difference
authorbelugas
Sun, 11 Mar 2007 02:53:44 +0000
changeset 6614 b41f2210a494
parent 6613 12caaa43c60f
child 6615 96d30d65ed35
(svn r9108) -Fix(9093) : MSVC was a bit unhappy with some of the type changes. So basically, widening the types makes the difference
src/newgrf.cpp
--- a/src/newgrf.cpp	Sun Mar 11 01:22:21 2007 +0000
+++ b/src/newgrf.cpp	Sun Mar 11 02:53:44 2007 +0000
@@ -1352,7 +1352,7 @@
 static void FeatureChangeInfo(byte *buf, int len)
 {
 	byte *bufend = buf + len;
-	int i;
+	uint i;
 
 	/* <00> <feature> <num-props> <num-info> <id> (<property <new-info>)...
 	 *
@@ -1394,8 +1394,8 @@
 	buf++;
 	uint8 feature  = grf_load_byte(&buf);
 	uint8 numprops = grf_load_byte(&buf);
-	uint8 numinfo  = grf_load_byte(&buf);
-	uint8 engine   = grf_load_byte(&buf);
+	uint numinfo  = grf_load_byte(&buf);
+	uint engine   = grf_load_byte(&buf);
 
 	grfmsg(6, "FeatureChangeInfo: feature %d, %d properties, to apply to %d+%d",
 	               feature, numprops, engine, numinfo);
@@ -1614,7 +1614,7 @@
 		_cur_spriteid, feature, num_sets, num_ents, num_sets * num_ents
 	);
 
-	for (uint i = 0; i < num_sets * num_ents; i++) {
+	for (uint16 i = 0; i < num_sets * num_ents; i++) {
 		LoadNextSprite(_cur_spriteid++, _file_index);
 		_nfo_line++;
 	}