Fixed empty files and otr generation

This commit is contained in:
KiritoDv
2023-08-17 02:47:21 -06:00
parent 1c5b3de55c
commit e0cc88e760
4 changed files with 14 additions and 10 deletions
+6 -2
View File
@@ -48,10 +48,14 @@ void Companion::ProcessAssets() {
{ "path", path },
{ "offsets", data }
};
gFactories.at(extension)->process(&write, entry, this->gRomData);
if(!gFactories.at(extension)->process(&write, entry, this->gRomData)){
std::cout << "Failed to process " << asset << '\n';
continue;
}
auto buffer = write.ToVector();
wrapper.CreateFile(path, buffer);
// TODO: Change this that we all know its going to crash with other assets
wrapper.CreateFile(path.substr(0, path.find_last_of('.')), buffer);
write.Close();
}