Skip to content

Commit

Permalink
Merge pull request #283 from chaoticgd/dl_level_overlays
Browse files Browse the repository at this point in the history
Fix unpacking code for Deadlocked level overlays
  • Loading branch information
chaoticgd authored Jan 5, 2025
2 parents e342716 + 54ed4ac commit a39d29d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wrenchbuild/common/elf_asset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static void unpack_elf_asset(ElfFileAsset& dest, InputStream& src, BuildConfig c
ElfFile elf = read_ratchet_executable(ratchet_bytes);
const ElfFile* donor_elf = nullptr;
if(config.game() == Game::DL) {
if(elf.sections.size() >= 2 && elf.sections[1].header.type == SHT_NOBITS) {
if(elf.sections.size() >= 3 && elf.sections[2].header.type == SHT_NOBITS) {
donor_elf = &DONOR_DL_LEVEL_ELF_NOBITS_HEADERS;
} else {
donor_elf = &DONOR_DL_LEVEL_ELF_PROGBITS_HEADERS;
Expand Down

0 comments on commit a39d29d

Please sign in to comment.