Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Tolerate missing } in .skin file format, with warning. #2873

Merged
merged 1 commit into from
Mar 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions source/main/resources/skin_fileformat/SkinFileFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "SkinFileFormat.h"

#include "Application.h"
#include "Console.h"
#include "Utils.h"

#include <OgreEntity.h>
Expand Down Expand Up @@ -67,11 +68,22 @@ std::vector<std::shared_ptr<RoR::SkinDef>> RoR::SkinParser::ParseSkins(Ogre::Dat
}
}
}

if (curr_skin)
{
App::GetConsole()->putMessage(
Console::CONSOLE_MSGTYPE_ACTOR, Console::CONSOLE_SYSTEM_WARNING,
fmt::format("Skin '{}' in file '{}' not properly closed with '}}'",
curr_skin->name, stream->getName()));
result.push_back(std::shared_ptr<SkinDef>(curr_skin.release())); // Submit anyway
}
}
catch (Ogre::Exception& e)
{
RoR::LogFormat("[RoR] Error parsing skin file '%s', message: %s",
stream->getName().c_str(), e.getFullDescription().c_str());
App::GetConsole()->putMessage(
Console::CONSOLE_MSGTYPE_ACTOR, Console::CONSOLE_SYSTEM_WARNING,
fmt::format("Error parsing skin file '{}', message: {}",
stream->getName(), e.getFullDescription()));
}
return result;
}
Expand Down