mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-11-24 06:19:25 +03:00
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:
1 parent
cdf363b236
commit
11b660abb0
1 file changed
+8
@@ -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(""));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user