Skip to content

Commit

Permalink
Fix 'folder replaces resource' egm-read issue (#2293)
Browse files Browse the repository at this point in the history
  • Loading branch information
KartikShrivastava committed Apr 22, 2022
1 parent b07b732 commit d4771fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CommandLine/libEGM/egm-read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,9 @@ bool EGMFileFormat::LoadDirectory(const fs::path& fPath, buffers::TreeNode* n,
}

void RecursiveResourceSanityCheck(buffers::TreeNode* n, std::map<Type, std::map<int, std::string>>& IDmap) {
// check if folder is present otherwise mutable_folder creates an unwanted folder
if(!n->has_folder())
return;

for (int i = 0; i < n->mutable_folder()->children_size(); ++i) {
buffers::TreeNode* c = n->mutable_folder()->mutable_children(i);
Expand Down

0 comments on commit d4771fd

Please sign in to comment.