-
Notifications
You must be signed in to change notification settings - Fork 15
Fixes and corrections #13
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
base: master
Are you sure you want to change the base?
Conversation
2be6cdc to
cb5c820
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses several important fixes and formatting corrections to align the codebase with the original PAWN repository style:
- Fixes a critical bug in the
memcpyfunction where the offset was incorrectly applied to the source pointer instead of the destination pointer, potentially causing out-of-bounds reads - Corrects indentation throughout the
strinsfunction from 4 spaces to 2 spaces for consistency with the rest of the codebase - Re-adds a missing comment and fixes a typo in a comment describing cell size
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| source/amx/amxstring.c | Fixes critical bug in memcpy (offset now applied to destination instead of source); fixes indentation in strins function from 4 spaces to 2 spaces |
| source/amx/amxfloat.c | Removes extraneous blank line between comment and code in n_floatfract |
| source/amx/amxfile.c | Re-adds missing comment in flength function; adjusts spacing for consistency |
| source/amx/amxcore.c | Minor spacing adjustments in function signatures and parameters for consistency |
| source/amx/amx.h | Fixes typo in comment ("32-bit cells" → "64-bit cells" for __64BIT__ case); reformats multi-line comment to single line |
| source/amx/amx.c | Minor spacing adjustments around operators and in blank lines for consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
the bug was introduced in commit e5b7d1a
|
I'm sorry for not creating a new PR and adding more stuff here, but it's as important as tiny, so probably no real need in another PR, but still needs to be proposed. Comparing to pawn-lang/compiler, there were rewritten some stuff like |
memcpyfunction: someone suddenly made a change, so now offset is applied tosourceinstead ofdest. This way, the functionmemcpyin omp server still have bounds checking for destination array only, so we could be reading out of bounds from the source array. Funny enough, it wasn't a thing in the last commits in pawn-lang/compiler repostrinsfunction. There should be 2 spaces instead of 4 like everywhere elseflengthwhich was in original pawn previously, fix typo in comment for "PAWN_CELL_SIZE 64"Most of format tweaks were made on purpose, to reduce unnecessary differences in diff checker when comparing it with other forks based on original pawn repo.