(svn r20731) -Fix (r20739): SmallVector did not have an assignment operator, causing invalid memory reads / double free
This commit is contained in:
@@ -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()) {
|
||||
|
Reference in New Issue
Block a user