diff options
| author | KiritoDv <kiritodev01@gmail.com> | 2023-08-17 02:47:21 -0600 |
|---|---|---|
| committer | KiritoDv <kiritodev01@gmail.com> | 2023-08-17 02:47:21 -0600 |
| commit | e0cc88e760322823cd1cbe44612ac82059d43fd7 (patch) | |
| tree | 8f51b615ef2befa2a75a298bc7d43fa490c20f72 /src/Companion.cpp | |
| parent | 1c5b3de55c72dca9a16c58a0f4dba3eee9b1f8e6 (diff) | |
Fixed empty files and otr generation
Diffstat (limited to 'src/Companion.cpp')
| -rw-r--r-- | src/Companion.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Companion.cpp b/src/Companion.cpp index a5fcb1b..2391ae2 100644 --- a/src/Companion.cpp +++ b/src/Companion.cpp @@ -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(); } |
