qbsp: fix iterator debug assertion in ChopBrushes
"cannot decrement begin list iterator"
This commit is contained in:
parent
2f7ca41638
commit
1ab6cc1e65
|
|
@ -1475,9 +1475,9 @@ newlist:
|
|||
|
||||
if (c1 < c2) {
|
||||
stats.c_from_split += sub.size();
|
||||
auto before = std::prev(list.erase(b1_it)); // remove the current brush, go back one
|
||||
list.splice(std::next(before), sub); // splice new list in place of where the brush was
|
||||
b1_it = std::next(before); // restart list with the new brushes
|
||||
auto before = list.erase(b1_it); // remove the current brush, go back one
|
||||
list.splice(before, sub); // splice new list in place of where the brush was
|
||||
b1_it = before; // restart list with the new brushes
|
||||
goto newlist;
|
||||
} else {
|
||||
stats.c_from_split += sub2.size();
|
||||
|
|
|
|||
|
|
@ -1545,6 +1545,15 @@ TEST_CASE("quake maps", "[testmaps_q1][.releaseonly]")
|
|||
}
|
||||
}
|
||||
|
||||
TEST_CASE("chop", "[testmaps_q1]")
|
||||
{
|
||||
const auto [bsp, bspx, prt] = LoadTestmapQ1("quake_map_source/DM1-test.map", {"-chop", "-debugchop"});
|
||||
|
||||
CHECK(GAME_QUAKE == bsp.loadversion->game->id);
|
||||
CHECK(prt);
|
||||
CheckFilled(bsp);
|
||||
}
|
||||
|
||||
TEST_CASE("base1leak", "[testmaps_q2]")
|
||||
{
|
||||
const auto [bsp, bspx, prt] = LoadTestmapQ2("base1leak.map");
|
||||
|
|
|
|||
Loading…
Reference in New Issue