diff options
Diffstat (limited to 'src/Companion.cpp')
| -rw-r--r-- | src/Companion.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Companion.cpp b/src/Companion.cpp index 886f152..3228eb4 100644 --- a/src/Companion.cpp +++ b/src/Companion.cpp @@ -842,7 +842,10 @@ void Companion::Process() { uint32_t alignment = entries[i + 1].alignment; int32_t gap = end - startptr; - if(gap < 0x10 && gap >= alignment && end % 0x10 == 0 && this->gEnablePadGen) { + if(gap < 0) { + stream << "\n// WARNING: Overlap detected between 0x" << std::hex << startptr << " and 0x" << end << "\n"; + SPDLOG_WARN("Overlap detected between 0x{:X} and 0x{:X}", startptr, end); + } else if(gap < 0x10 && gap >= alignment && end % 0x10 == 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(); @@ -863,11 +866,6 @@ void Companion::Process() { } else if(gap > 0x10) { stream << "\n// WARNING: Gap detected between 0x" << std::hex << startptr << " and 0x" << end << " with size 0x" << gap << "\n"; } - - if(gap < 0) { - stream << "\n// WARNING: Overlap detected between 0x" << std::hex << startptr << " and 0x" << end << "\n"; - SPDLOG_WARN("Overlap detected between 0x{:X} and 0x{:X}", startptr, end); - } } } |
