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 Mem.h #136

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

Update Mem.h #136

wants to merge 1 commit into from

Conversation

PrIzRaKDev
Copy link

There are a few things in your C++ code that can cause errors or be potentially dangerous. --------------------------------------------------------------------------- Here are the corrections I've made:

Added #include <cstring> for memcpy and memset functions. Use size_t instead of int for dimensions to conform to C++ standard definitions. Fixed MemCopy functions to avoid overloading with identical parameters. Added type conversions to work correctly with pointers. Fixed pointer incrementing operations after writing operations. Added BYTE and DWORD type declarations and constants for OP_JMP and OP_CALL opcodes.

There are a few things in your C++ code that can cause errors or be potentially dangerous.
---------------------------------------------------------------------------
Here are the corrections I've made:

Added ```#include <cstring>``` for memcpy and memset functions.
Use ```size_t``` instead of ```int``` for dimensions to conform to C++ standard definitions.
Fixed ```MemCopy``` functions to avoid overloading with identical parameters.
Added type conversions to work correctly with pointers.
Fixed pointer incrementing operations after writing operations.
Added ```BYTE``` and ```DWORD``` type declarations and constants for ```OP_JMP``` and ```OP_CALL``` opcodes.
@x87 x87 force-pushed the master branch 5 times, most recently from 1e46701 to 50df696 Compare June 4, 2024 02:07
using BYTE = unsigned char;
using DWORD = unsigned long;

constexpr BYTE OP_JMP = 0xE9;
Copy link
Collaborator

Choose a reason for hiding this comment

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

It doesn't build in current project settings.

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.

Doesn't built

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