(svn r4716) - NewGRF: fix problem with loading custom station class id; use BSWAP32() only on variables, not functions.
authorpeter1138
Wed, 03 May 2006 19:31:00 +0000
changeset 3736 a0cf9e858d1d
parent 3735 76dacda0b4da
child 3737 1e4df4eb9298
(svn r4716) - NewGRF: fix problem with loading custom station class id; use BSWAP32() only on variables, not functions.
newgrf.c
--- a/newgrf.c	Wed May 03 16:18:45 2006 +0000
+++ b/newgrf.c	Wed May 03 19:31:00 2006 +0000
@@ -793,8 +793,8 @@
 		case 0x08: /* Class ID */
 			FOR_EACH_OBJECT {
 				/* Swap classid because we read it in BE meaning WAYP or DFLT */
-				uint32 classid = BSWAP32(grf_load_dword(&buf));
-				statspec[i].sclass = AllocateStationClass(classid);
+				uint32 classid = grf_load_dword(&buf);
+				statspec[i].sclass = AllocateStationClass(BSWAP32(classid));
 			}
 			break;