diff options
author | peter1138 <peter1138@openttd.org> | 2011-11-25 11:45:46 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2011-11-25 11:45:46 +0000 |
commit | 8be8d5e843c0b1cdc3f94cdd1a3febc5a2ff197e (patch) | |
tree | 7d25e80a6b017cd015258487d760258a8cc8720d /src/spriteloader | |
parent | 7ff6daee8066276207f7e9fd6f10e9da3b4b1019 (diff) | |
download | openttd-8be8d5e843c0b1cdc3f94cdd1a3febc5a2ff197e.tar.xz |
(svn r23324) -Fix (r15555): Don't free reusable buffer.
Diffstat (limited to 'src/spriteloader')
-rw-r--r-- | src/spriteloader/grf.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/spriteloader/grf.cpp b/src/spriteloader/grf.cpp index 2876f2f35..b4533ae94 100644 --- a/src/spriteloader/grf.cpp +++ b/src/spriteloader/grf.cpp @@ -109,7 +109,6 @@ bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, do { if (dest + 2 > dest_orig + dest_size) { - free(sprite->data); return WarnCorruptSprite(file_slot, file_pos, __LINE__); } @@ -125,7 +124,6 @@ bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, data = &sprite->data[y * sprite->width + skip]; if (skip + length > sprite->width || dest + length > dest_orig + dest_size) { - free(sprite->data); return WarnCorruptSprite(file_slot, file_pos, __LINE__); } @@ -142,7 +140,6 @@ bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, } } else { if (dest_size < sprite->width * sprite->height) { - free(sprite->data); return WarnCorruptSprite(file_slot, file_pos, __LINE__); } |