1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-17 07:07:38 +00:00

Fix UB when sorting empty vecs

This commit is contained in:
Jesse Ruderman
2021-07-11 20:54:25 -07:00
parent 08cbe8e4e0
commit 123994bdc2
6 changed files with 7 additions and 7 deletions

View File

@@ -331,7 +331,7 @@ void find_track(cell *start, int sign, int len) {
}
EX void block_cells(vector<cell*> to_block, function<bool(cell*)> blockbound) {
hrandom_shuffle(&to_block[0], isize(to_block));
hrandom_shuffle(to_block);
for(cell *c: to_block) switch(specialland) {
case laIce: