From 923420fd0d5270c16706d77bb9380db8a74aa973 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 31 Jul 2021 20:30:12 +0200 Subject: [PATCH] altmap:: protect from crashing barriers --- bigstuff.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bigstuff.cpp b/bigstuff.cpp index 53eabf53..861dfd1b 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -261,6 +261,8 @@ EX heptagon *create_altmap(cell *c, int rad, hstate firststate, int special IS(0 cellwalker bf(c, gdir); bf += rev; auto p = generate_random_path(bf, rad, false, false); + + for(auto c: p.path) if(c->bardir != NODIR) return nullptr; heptagon *h = p.last.at->master;