Skip to content

Commit 48c2b5e

Browse files
authored
Merge pull request #486 from josephcsible/freefallhorodisk
Fix Free Fall crashing in horodisk land structure
2 parents 93d6740 + c0092bd commit 48c2b5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

complex2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ EX namespace westwall {
224224
void build(vector<cell*>& whirlline, int d) {
225225
again:
226226
cell *at = whirlline[isize(whirlline)-1];
227-
cell *prev = whirlline[isize(whirlline)-2];
227+
cell *prev = isize(whirlline) >= 2 ? whirlline[isize(whirlline)-2] : NULL;
228228
if(looped(whirlline)) return;
229229
for(int i=0; i<at->type; i++)
230230
if(at->move(i) && coastvalEdge1(at->move(i)) == d && at->move(i) != prev) {

0 commit comments

Comments
 (0)