1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-18 10:38:31 +02:00

Don't hardcode 400 in editorclass::save()

That way, if the size of `level` changes, this code won't end up being
wrong.
This commit is contained in:
Misa 2020-09-09 22:13:59 -07:00 committed by Ethan Lee
parent f02dcbfdad
commit 19a8352775

View File

@ -2124,7 +2124,7 @@ bool editorclass::save(std::string& _path)
data->LinkEndChild( msg );
msg = doc.NewElement( "levelMetaData" );
for(int i = 0; i < 400; i++)
for(size_t i = 0; i < SDL_arraysize(level); i++)
{
tinyxml2::XMLElement *edlevelclassElement = doc.NewElement( "edLevelClass" );
edlevelclassElement->SetAttribute( "tileset", level[i].tileset);