(svn r4752) - NewGRF: brokenness slipped through...
authorpeter1138
Sat, 06 May 2006 20:27:32 +0000
changeset 3761 5ed565b343cf
parent 3760 10a6f762e754
child 3762 13348590b1bc
(svn r4752) - NewGRF: brokenness slipped through...
newgrf.c
--- a/newgrf.c	Sat May 06 20:20:02 2006 +0000
+++ b/newgrf.c	Sat May 06 20:27:32 2006 +0000
@@ -1783,7 +1783,7 @@
 					switch (GB(id, 8, 8)) {
 						case 0xC4: /* Station class name */
 							if (GB(id, 0, 8) >= _cur_grffile->num_stations) {
-								grfmsg(GMS_WARN, "VehicleNewName: Attempt to name undefined station 0x%X, ignoring.", station);
+								grfmsg(GMS_WARN, "VehicleNewName: Attempt to name undefined station 0x%X, ignoring.", GB(id, 0, 8));
 							} else {
 								StationClassID sclass = _cur_grffile->stations[GB(id, 0, 8)].sclass;
 								SetStationClassName(sclass, AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name));
@@ -1792,9 +1792,9 @@
 
 						case 0xC5: /* Station name */
 							if (GB(id, 0, 8) >= _cur_grffile->num_stations) {
-								grfmsg(GMS_WARN, "VehicleNewName: Attempt to name undefined station 0x%X, ignoring.", station);
+								grfmsg(GMS_WARN, "VehicleNewName: Attempt to name undefined station 0x%X, ignoring.", GB(id, 0, 8));
 							} else {
-								_cur_grffile->stations[station].name = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name);
+								_cur_grffile->stations[GB(id, 0, 8)].name = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name);
 							}
 							break;