fix: Split String returning an empty string when an empty string is passed in

Tested that slash commands function as before, except now if you pass no arguments to a command like /fly, it no longer reports an invalid command.
This commit is contained in:
David Markowitz
2025-06-29 01:43:53 -07:00
parent 48510b7315
commit 03b1c2b183
3 changed files with 16 additions and 55 deletions

View File

@@ -1777,7 +1777,7 @@ void InventoryComponent::LoadGroupXml(const tinyxml2::XMLElement& groups) {
group.groupId = groupId;
group.groupName = groupName;
for (const auto& lotStr : GeneralUtils::SplitString(lots, ' ')) {
for (const auto& lotStr : GeneralUtils::SplitString(std::string_view(lots), ' ')) {
auto lot = GeneralUtils::TryParse<LOT>(lotStr);
if (lot) group.lots.insert(*lot);
}