Fix excluded locations regressions causing crash (#6375)
This commit is contained in:
@@ -105,7 +105,7 @@ void DrawLocationsMenu(WidgetInfo& info) {
|
|||||||
if (!excludedLocationString.empty()) {
|
if (!excludedLocationString.empty()) {
|
||||||
excludedLocationString += ",";
|
excludedLocationString += ",";
|
||||||
}
|
}
|
||||||
excludedLocationString += excludedLocationIt;
|
excludedLocationString += std::to_string(excludedLocationIt);
|
||||||
}
|
}
|
||||||
CVarSetString(CVAR_RANDOMIZER_SETTING("ExcludedLocations"),
|
CVarSetString(CVAR_RANDOMIZER_SETTING("ExcludedLocations"),
|
||||||
excludedLocationString.c_str());
|
excludedLocationString.c_str());
|
||||||
@@ -152,7 +152,7 @@ void DrawLocationsMenu(WidgetInfo& info) {
|
|||||||
if (!excludedLocationString.empty()) {
|
if (!excludedLocationString.empty()) {
|
||||||
excludedLocationString += ",";
|
excludedLocationString += ",";
|
||||||
}
|
}
|
||||||
excludedLocationString += excludedLocationIt;
|
excludedLocationString += std::to_string(excludedLocationIt);
|
||||||
}
|
}
|
||||||
if (excludedLocationString == "") {
|
if (excludedLocationString == "") {
|
||||||
CVarClear(CVAR_RANDOMIZER_SETTING("ExcludedLocations"));
|
CVarClear(CVAR_RANDOMIZER_SETTING("ExcludedLocations"));
|
||||||
@@ -188,8 +188,10 @@ void UpdateMenuLocations() {
|
|||||||
std::string excludedLocationString;
|
std::string excludedLocationString;
|
||||||
excludedLocations.clear();
|
excludedLocations.clear();
|
||||||
while (getline(excludedLocationStringStream, excludedLocationString, ',')) {
|
while (getline(excludedLocationStringStream, excludedLocationString, ',')) {
|
||||||
|
if (!excludedLocationString.empty()) {
|
||||||
excludedLocations.insert((RandomizerCheck)std::stoi(excludedLocationString));
|
excludedLocations.insert((RandomizerCheck)std::stoi(excludedLocationString));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateMenuTricks() {
|
void UpdateMenuTricks() {
|
||||||
@@ -207,8 +209,10 @@ void UpdateMenuTricks() {
|
|||||||
std::string enabledGlitchString;
|
std::string enabledGlitchString;
|
||||||
enabledGlitches.clear();
|
enabledGlitches.clear();
|
||||||
while (getline(enabledGlitchStringStream, enabledGlitchString, ',')) {
|
while (getline(enabledGlitchStringStream, enabledGlitchString, ',')) {
|
||||||
|
if (!enabledGlitchString.empty()) {
|
||||||
enabledGlitches.insert((RandomizerTrick)std::stoi(enabledGlitchString));
|
enabledGlitches.insert((RandomizerTrick)std::stoi(enabledGlitchString));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawTricksMenu(WidgetInfo& info) {
|
void DrawTricksMenu(WidgetInfo& info) {
|
||||||
|
|||||||
Reference in New Issue
Block a user