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 cdf363b236
commit 11b660abb0

View File

@@ -1392,6 +1392,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
{ {
@@ -1409,6 +1413,10 @@ next:
{ {
name.text.push_back(std::string(text)); name.text.push_back(std::string(text));
} }
else
{
name.text.push_back(std::string(""));
}
} }
} }
} }