Skip to content

Commit

Permalink
hack fix for 281
Browse files Browse the repository at this point in the history
  • Loading branch information
LAK132 committed Oct 29, 2023
1 parent 0a297e8 commit 307d30c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/explorer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3487,6 +3487,12 @@ namespace SourceExplorer
// used for offsets.
const size_t begin = cstrm.position();

if (!game.old_game && game.product_build <= 281)
{
ERROR(":TODO: HACK FIX FOR 281 CRASH");
return lak::ok_t{};
}

TRY_ASSIGN(size =, cstrm.read_u32());

DEBUG("Size: ", size);
Expand Down Expand Up @@ -3905,6 +3911,12 @@ namespace SourceExplorer

data_reader_t pstrm(span);

if (!game.old_game && game.product_build <= 281)
{
ERROR(":TODO: HACK FIX FOR 281 CRASH");
return lak::ok_t{};
}

TRY_ASSIGN(unknown =, pstrm.read_u32());

CHECK_REMAINING(pstrm, colors.size() * 4);
Expand Down Expand Up @@ -4047,6 +4059,12 @@ namespace SourceExplorer
auto span =,
entry.decode_body().RES_ADD_TRACE("frame::object_instances_t::read"));

if (!game.old_game && game.product_build <= 281)
{
ERROR(":TODO: HACK FIX FOR 281 CRASH");
return lak::ok_t{};
}

data_reader_t hstrm(span);

TRY_ASSIGN(const auto object_count =, hstrm.read_u32());
Expand Down

0 comments on commit 307d30c

Please sign in to comment.