CruiserOne / Daedalus

The Maze generation software "Daedalus", version 3.4
http://www.astrolog.org/labyrnth/daedalus.htm
Other
53 stars 7 forks source link

Loop hang #4

Closed Zlava closed 5 months ago

Zlava commented 5 months ago

In the file create3.cpp in function void Generic::GenerateWireframe() at lines 254-256 there is this part: loop { if (!FIsOnMaze(area) || !FIsRoom(area)) continue;

If the condition is true the function infinitely evaluates the condition. Maybe the continue was supposed to belong to the outer for loop at line 251? Or maybe it is supposed to be: loop { if (!FIsOnMaze(area) || !FIsRoom(area)) { area = LNext(area); continue; }

CruiserOne commented 5 months ago

Thank you for pointing this out! :) Fortunately, the check which will hang can never be reached, so a hang can't be produced here when actually running the program. The previous loop indeed covers the condition, and the check can be deleted. I'll make this code better in the next version.