diff options
author | frosch <frosch@openttd.org> | 2011-05-29 16:54:40 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-05-29 16:54:40 +0000 |
commit | 5b449145f7983d44d73195b8a18e4a2da721ee71 (patch) | |
tree | 7064dd32b7450d7c737459bcb6d27eca34a6ca00 | |
parent | 8f921c8747d2a59b4c8e4ee4df441a81bbf17a7e (diff) | |
download | openttd-5b449145f7983d44d73195b8a18e4a2da721ee71.tar.xz |
(svn r22517) -Fix (r22472): If a NewGRF sprite ran out of bytes at a very specific point, data might be freed twice.
-rw-r--r-- | src/newgrf.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 0b0fe63b4..605b17023 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -1255,9 +1255,8 @@ static ChangeInfoResult StationChangeInfo(uint stid, int numinfo, int prop, Byte } case 0x09: // Define sprite layout - delete[] statspec->renderdata; // delete earlier loaded stuff - statspec->tiles = buf->ReadExtendedByte(); + delete[] statspec->renderdata; // delete earlier loaded stuff statspec->renderdata = new NewGRFSpriteLayout[statspec->tiles]; for (uint t = 0; t < statspec->tiles; t++) { |