# HG changeset patch # User Kuhnovic <68320206+Kuhnovic@users.noreply.github.com> # Date 2024-02-27 11:55:42 # Node ID ac82714dfd1ef2bf3c8b31f27e813320dfbd2de0 # Parent f495cf1ac8a1e16d8ab3f00c1b49634e72775509 Fix e38c3c5: Added missing return statement (#12185) diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp --- a/src/pathfinder/yapf/yapf_ship.cpp +++ b/src/pathfinder/yapf/yapf_ship.cpp @@ -252,7 +252,7 @@ public: path_found = pf.FindPath(v); Node *node = pf.GetBestNode(); if (attempt == 0 && !path_found) continue; // Try again with restricted search area. - if (!path_found || node == nullptr) GetRandomFollowUpTrackdir(v, src_tile, trackdir, true); + if (!path_found || node == nullptr) return GetRandomFollowUpTrackdir(v, src_tile, trackdir, true); /* Return only the path within the current water region if an intermediate destination was returned. If not, cache the entire path * to the final destination tile. The low-level pathfinder might actually prefer a different docking tile in a nearby region. Without