Fix UB when sorting empty vecs

This commit is contained in:
Jesse Ruderman committed 2021-07-11 20:54:25 -07:00
1 parent 08cbe8e4e0
commit 123994bdc2
6 files changed
+7 -7

No files matched your search

+1 -1
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: