From 09ade8bb7fc85f35dcabb2def2e2694f29739765 Mon Sep 17 00:00:00 2001 From: inspectredc Date: Wed, 27 Nov 2024 21:37:31 +0000 Subject: pad autogen happens between all aligned assets --- src/Companion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Companion.cpp') diff --git a/src/Companion.cpp b/src/Companion.cpp index 7461dc6..3fca4e3 100644 --- a/src/Companion.cpp +++ b/src/Companion.cpp @@ -888,7 +888,7 @@ void Companion::ProcessFile(YAML::Node root) { if(gap < 0) { stream << "// WARNING: Overlap detected between 0x" << std::hex << startptr << " and 0x" << end << " with size 0x" << std::abs(gap) << "\n"; SPDLOG_WARN("Overlap detected between 0x{:X} and 0x{:X} with size 0x{:X} on file {}", startptr, end, gap, this->gCurrentFile); - } else if(gap < 0x10 && gap >= alignment && end % 0x10 == 0 && this->gEnablePadGen) { + } else if(gap < 0x10 && gap >= alignment && end % alignment == 0 && this->gEnablePadGen) { SPDLOG_WARN("Gap detected between 0x{:X} and 0x{:X} with size 0x{:X} on file {}", startptr, end, gap, this->gCurrentFile); SPDLOG_WARN("Creating pad of 0x{:X} bytes", gap); const auto padfile = this->gCurrentDirectory.filename().string(); -- cgit v1.2.3