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

Update CGameMenu.cpp #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

PrIzRaKDev
Copy link

Changes:

  • Fixed a bug where the CTexture_DrawInRect call was manually inserted into the code, which could cause stack alignment issues.
    • Fixed a bug where the posX and posY variables were declared without initialization.
  • Fixed a bug where the code did not check for errors when calling the MemoryNop and MemoryJump functions.
  • Added a check that the CTEXTURE_DRAW_BG_RECT function call address is valid before inserting a hook.
  • Stack clearing with pop ebp added to OnDrawMenuBackground function to properly restore the stack after calling CTexture_DrawInRect.


**Changes:**

* Fixed a bug where the `CTexture_DrawInRect` call was manually inserted into the code, which could cause stack alignment issues.
* * Fixed a bug where the `posX` and `posY` variables were declared without initialization.
* Fixed a bug where the code did not check for errors when calling the `MemoryNop` and `MemoryJump` functions.
* Added a check that the `CTEXTURE_DRAW_BG_RECT` function call address is valid before inserting a hook.
* Stack clearing with `pop ebp` added to `OnDrawMenuBackground` function to properly restore the stack after calling `CTexture_DrawInRect`.
}

void CGameMenu::Inject(CCodeInjector& inj)
void CGameMenu::Inject(CCodeInjector& inj)
Copy link
Collaborator

Choose a reason for hiding this comment

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

What are these &

@MiranDMC
Copy link
Collaborator

MiranDMC commented Jun 3, 2024

Did you even compiled and ran it?

@x87 x87 force-pushed the master branch 5 times, most recently from 1e46701 to 50df696 Compare June 4, 2024 02:07
Copy link
Collaborator

@MiranDMC MiranDMC left a comment

Choose a reason for hiding this comment

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

Was it even compiled and tested?

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

Successfully merging this pull request may close these issues.

2 participants