Zoning: Fix off-by-one in zoning cache rect invalidation (SW edge)
This commit is contained in:
@@ -459,7 +459,7 @@ void ZoningMarkDirtyStationCoverageArea(const Station *st, ZoningModeMask mask)
|
|||||||
for (int y = rect.top; y <= rect.bottom; y++) {
|
for (int y = rect.top; y <= rect.bottom; y++) {
|
||||||
auto iter = cache.lower_bound(TileXY(rect.left, y) << 3);
|
auto iter = cache.lower_bound(TileXY(rect.left, y) << 3);
|
||||||
auto end_iter = iter;
|
auto end_iter = iter;
|
||||||
uint end = TileXY(rect.right, y) << 3;
|
uint end = (TileXY(rect.right, y) + 1) << 3;
|
||||||
while (end_iter != cache.end() && *end_iter < end) ++end_iter;
|
while (end_iter != cache.end() && *end_iter < end) ++end_iter;
|
||||||
cache.erase(iter, end_iter);
|
cache.erase(iter, end_iter);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user