feat: add symbols support in FindSignature#1052
Open
qstage wants to merge 1 commit intoroflmuffin:mainfrom
Open
feat: add symbols support in FindSignature#1052qstage wants to merge 1 commit intoroflmuffin:mainfrom
FindSignature#1052qstage wants to merge 1 commit intoroflmuffin:mainfrom
Conversation
roflmuffin reviewed Oct 17, 2025
| } | ||
| | ||
| return module->FindSignature(bytesStr); | ||
| return bytesStr[0] == '@' ? module->FindSymbol(bytesStr + 1) : module->FindSignature(bytesStr); |
Owner
There was a problem hiding this comment.
Won't this cause issues if the first byte of a signature is 0x40, like it currently is for CGameEventManager_Init on windows?
Contributor
There was a problem hiding this comment.
Won't this cause issues if the first byte of a signature is 0x40, like it currently is for
CGameEventManager_Initon windows?
CounterStrikeSharp/src/core/memory.cpp
Lines 25 to 34 in 87a5a2f
the bytesStr parameter is a string, not raw bytes
so, for "40 53 ..."(CGameEventManager_Init on windows), bytesStr[0] is the char -> '4', not the byte -> 0x40 (char -> '@')
the '@' prefix check happens at the string level before any hex parsing, so there's no conflict with signatures that have 0x40 as their first byte, imo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.