Fix empty roomnames potentially crashing the game

TinyXML2 seems to sometimes return NULL when an element has either no
text or whitespace, instead of returning an empty string. Why it does
this, I'm not sure, but I have recently learned from Dav999 that it
will crash the game. Great.
This commit is contained in:
NyakoFox
2026-02-15 20:37:11 -04:00
committed by Ethan Lee
parent 30bdb47f80
commit b708b8911c

View File

@@ -1387,6 +1387,10 @@ next:
{ {
name.text.push_back(std::string(text)); name.text.push_back(std::string(text));
} }
else
{
name.text.push_back(std::string(""));
}
} }
else else
{ {
@@ -1404,6 +1408,10 @@ next:
{ {
name.text.push_back(std::string(text)); name.text.push_back(std::string(text));
} }
else
{
name.text.push_back(std::string(""));
}
} }
} }
} }