From c0092bd5465ac448e7898342f1e25efc26737a2a Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Mon, 17 Nov 2025 00:00:22 -0500 Subject: [PATCH] Fix Free Fall crashing in horodisk land structure It still doesn't work completely right (in particular, you'll get the "warning: a looped line" message, and gravity will point the wrong way on some of the outermost tiles), but this is way better than the whole game crashing whenever you get near the land at all. --- complex2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/complex2.cpp b/complex2.cpp index 697cd48b..08da1681 100644 --- a/complex2.cpp +++ b/complex2.cpp @@ -224,7 +224,7 @@ EX namespace westwall { void build(vector& whirlline, int d) { again: cell *at = whirlline[isize(whirlline)-1]; - cell *prev = whirlline[isize(whirlline)-2]; + cell *prev = isize(whirlline) >= 2 ? whirlline[isize(whirlline)-2] : NULL; if(looped(whirlline)) return; for(int i=0; itype; i++) if(at->move(i) && coastvalEdge1(at->move(i)) == d && at->move(i) != prev) {