diff options
author | yexo <yexo@openttd.org> | 2010-09-03 23:04:02 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-09-03 23:04:02 +0000 |
commit | 0decc3e09433dd480862dbe608c04fec26c00795 (patch) | |
tree | 458140b31e1bab88aaef544b70e6cc00f4434037 /src/landscape.cpp | |
parent | 9a0033cbf6ac68d002b561dc04c097126b5ef729 (diff) | |
download | openttd-0decc3e09433dd480862dbe608c04fec26c00795.tar.xz |
(svn r20731) -Fix (r20739): SmallVector did not have an assignment operator, causing invalid memory reads / double free
Diffstat (limited to 'src/landscape.cpp')
-rw-r--r-- | src/landscape.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/landscape.cpp b/src/landscape.cpp index f3bcaa263..e6c5bd5df 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -638,7 +638,7 @@ CommandCost CmdClearArea(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 for (int x = sx; x <= ex; ++x) { for (int y = sy; y <= ey; ++y) { - SmallVector<TileArea, 1> object_areas = _cleared_object_areas; + SmallVector<TileArea, 1> object_areas(_cleared_object_areas); CommandCost ret = DoCommand(TileXY(x, y), 0, 0, flags & ~DC_EXEC, CMD_LANDSCAPE_CLEAR); _cleared_object_areas = object_areas; if (ret.Failed()) { |