diff options
author | truelight <truelight@openttd.org> | 2004-12-04 15:02:45 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-12-04 15:02:45 +0000 |
commit | 0434287ef826a4ed72cd8528a52a86ae8b70a948 (patch) | |
tree | 7690c1906ba1280229ea4e0d07c5fecc0273d975 /newgrf.c | |
parent | e56c3cddd8fcf8c852ee7f3c8dc49df9623a94d0 (diff) | |
download | openttd-0434287ef826a4ed72cd8528a52a86ae8b70a948.tar.xz |
(svn r939) -Fix: Fixed compiler errors
Diffstat (limited to 'newgrf.c')
-rw-r--r-- | newgrf.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -855,6 +855,7 @@ static bool StationChangeInfo(uint stid, int numinfo, int prop, byte **bufp, int stat->platforms[l] = number; } + p = 0; layout = malloc(length * number); for (l = 0; l < length; l++) for (p = 0; p < number; p++) @@ -862,6 +863,7 @@ static bool StationChangeInfo(uint stid, int numinfo, int prop, byte **bufp, int l--; p--; + assert(p >= 0); free(stat->layouts[l][p]); stat->layouts[l][p] = layout; } @@ -949,7 +951,7 @@ static void VehicleChangeInfo(byte *buf, int len) uint8 numprops; uint8 numinfo; byte engine; - EngineInfo *ei; + EngineInfo *ei = NULL; if (len == 1) { DEBUG(grf, 8) ("Silently ignoring one-byte special sprite 0x00."); @@ -972,6 +974,8 @@ static void VehicleChangeInfo(byte *buf, int len) if (feature != GSF_STATION) ei = &_engine_info[engine + _vehshifts[feature]]; + /* XXX - Should there not be a check to see if 'ei' is NULL + when it is used in the switch below?? -- TrueLight */ buf += 5; |