Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"When nobody wants to remove the max data size limit but only increase it" #68

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion H2Codez/Common/H2EKCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ char __cdecl tags__fix_corrupt_fields___hook(tag_block_defintions *def, tag_bloc
return tags__fix_corrupt_fields_org(def, data, 1);
}

static void set_tag_data_max_size(size_t limit)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but like seriously keep the static

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable won't change after putting the option if it's static?

void set_tag_data_max_size(size_t limit)
{
// error message, check, set to
std::array<size_t, 3> offsets_tool = { 0x5DDD72, 0x5DDEAB, 0x5DDEB6 };
Expand Down Expand Up @@ -408,6 +408,12 @@ void H2CommonPatches::Init()

set_tag_data_max_size(0x3000000);

if (conf.getBoolean("remove_data_size_limit", true))
{
set_tag_data_max_size(INT_MAX);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk dude INT_MAX might be too large, maybe INT_MAX - 5

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default to false

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and a setting to set make size would be best, dunno if we have a range limited setting option

Copy link
Contributor Author

@Berthalamew Berthalamew Aug 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk if there are no issues with putting the size limit to its max there isn't really a point of putting a setting for how big you want it in (so far I haven't seen any issues when putting it to MAX)

}


// hook exception setter
auto SetUnhandledExceptionFilterOrg = SetUnhandledExceptionFilter;
DetourAttach(&(PVOID&)SetUnhandledExceptionFilterOrg, SetUnhandledExceptionFilter_hook);
Expand Down