mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
ignore out of bounds entrance overrides in json (#5253)
was causing segfault when using settings from door shuffle on develop
This commit is contained in:
parent
6a93625f5c
commit
f9cde383b7
1 changed files with 1 additions and 1 deletions
|
@ -1645,7 +1645,7 @@ void EntranceShuffler::ParseJson(nlohmann::json spoilerFileJson) {
|
|||
try {
|
||||
nlohmann::json entrancesJson = spoilerFileJson["entrances"];
|
||||
size_t i = 0;
|
||||
for (auto it = entrancesJson.begin(); it != entrancesJson.end(); ++it, i++) {
|
||||
for (auto it = entrancesJson.begin(); it != entrancesJson.end() && i < entranceOverrides.size(); ++it, i++) {
|
||||
nlohmann::json entranceJson = *it;
|
||||
for (auto entranceIt = entranceJson.begin(); entranceIt != entranceJson.end(); ++entranceIt) {
|
||||
if (entranceIt.key() == "type") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue