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

Calling Real Function With Custom Variables Crash #20

Open
ELCHILEN0 opened this issue Oct 1, 2011 · 1 comment
Open

Calling Real Function With Custom Variables Crash #20

ELCHILEN0 opened this issue Oct 1, 2011 · 1 comment

Comments

@ELCHILEN0
Copy link

I notice that when I try to call the originalFunctionReentryIsland from my override function (or any function) with any custom variables other than the true variables passed by the program my application crashes. For example:
void (*_real_function)(void *arg1, float arg2, float arg3);

void _hook_function(void _arg1, float arg2, float arg3) {
(__real_function)(arg1, arg2, arg3); // Doesn't crash here.
(*_real_function)(arg1, 0.0, 0.0); // Crashes here.
}

If anyone could help with a fix or at least confirm that this is an error that would be great. Thanks.

@rentzsch
Copy link
Owner

rentzsch commented Oct 1, 2011

Should work. Reason you're referencing _real_function in the second attempt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants