Skip to content

Commit

Permalink
Increase bitmap size limit to 8k.
Browse files Browse the repository at this point in the history
  • Loading branch information
num0005 committed Nov 2, 2019
1 parent 82c3406 commit 594c999
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions H2Codez/Common/H2EKCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,11 @@ static void set_tag_data_max_size(size_t limit)
WriteValue(offset + 1, limit);
}

static bool __cdecl check_bitmap_dimension(int format, int type, __int16 dimension)
{
return dimension > 0 && dimension <= 8192;
}

void H2CommonPatches::Init()
{
DetourTransactionBegin();
Expand Down Expand Up @@ -404,6 +409,8 @@ void H2CommonPatches::Init()
DetourAttach(&(PVOID&)tags__fix_corrupt_fields_org, tags__fix_corrupt_fields___hook);
}

WriteJmp(SwitchByMode(0x720FF0, 0x6FFCE0, 0x65D030), check_bitmap_dimension);

fix_documents_path_string_type();

haloscript_init();
Expand Down

0 comments on commit 594c999

Please sign in to comment.