mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-03-30 05:31:47 +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:
@@ -1392,6 +1392,10 @@ next:
|
||||
{
|
||||
name.text.push_back(std::string(text));
|
||||
}
|
||||
else
|
||||
{
|
||||
name.text.push_back(std::string(""));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1409,6 +1413,10 @@ next:
|
||||
{
|
||||
name.text.push_back(std::string(text));
|
||||
}
|
||||
else
|
||||
{
|
||||
name.text.push_back(std::string(""));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user