File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ Template for new versions:
5757## New Features
5858
5959## Fixes
60+ - `preserve-rooms` will no longer hang on startup in the presence of a cycle in the replacement relationship of noble positions
6061
6162## Misc Improvements
6263
Original file line number Diff line number Diff line change @@ -320,9 +320,13 @@ local function get_codes(positions)
320320 if position .replaced_by == - 1 then
321321 ensure_key (grouped , id )[id ] = position
322322 else
323+ -- replaced-by links may be cyclic. this code will behave "incorrectly" in the event
324+ -- of a cycle but will not hang. a proper fix is still needed. see issue DFHack/dfhack#5538
323325 local parent = positions [position .replaced_by ]
324- while parent .replaced_by ~= - 1 do
326+ local counter = 0
327+ while parent .replaced_by ~= - 1 and counter < 10 do
325328 parent = positions [parent .replaced_by ]
329+ counter = counter + 1
326330 end
327331 ensure_key (grouped , parent .id )[id ] = position
328332 end
You can’t perform that action at this time.
0 commit comments