Changeset - r17727:ae71ad34e6a0
[Not reviewed]
master
0 1 0
frosch - 13 years ago 2011-05-29 16:54:40
frosch@openttd.org
(svn r22517) -Fix (r22472): If a NewGRF sprite ran out of bytes at a very specific point, data might be freed twice.
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/newgrf.cpp
Show inline comments
 
@@ -1255,9 +1255,8 @@ static ChangeInfoResult StationChangeInf
 
			}
 

	
 
			case 0x09: // Define sprite layout
 
				statspec->tiles = buf->ReadExtendedByte();
 
				delete[] statspec->renderdata; // delete earlier loaded stuff
 

	
 
				statspec->tiles = buf->ReadExtendedByte();
 
				statspec->renderdata = new NewGRFSpriteLayout[statspec->tiles];
 

	
 
				for (uint t = 0; t < statspec->tiles; t++) {
0 comments (0 inline, 0 general)