ips_layer: Fix inaccuracies with comments and flags

Specifically bugs/crashes that arise when putting them in positions that are legal but not typical, such as midline, between patch data, or between patch records.
This commit is contained in:
Zach Hilman 2018-10-04 12:23:18 -04:00
parent c60739016d
commit 794fdbd680
3 changed files with 51 additions and 16 deletions

View file

@ -76,7 +76,7 @@ VirtualDir PatchManager::PatchExeFS(VirtualDir exefs) const {
static std::vector<VirtualFile> CollectPatches(const std::vector<VirtualDir>& patch_dirs,
const std::string& build_id) {
std::vector<VirtualFile> out;
ips.reserve(patch_dirs.size());
out.reserve(patch_dirs.size());
for (const auto& subdir : patch_dirs) {
auto exefs_dir = subdir->GetSubdirectory("exefs");
if (exefs_dir != nullptr) {