Repository navigation
fix: reject invalid flag in RegisterQueryFile - #394
Merged
Nord1cWarr1or merged 2 commits intoSep 24, 2026
Merged
Nord1cWarr1or merged 2 commits into
Nord1cWarr1or merged 2 commits into
Conversation
RES_TYPE_NONE/RES_TYPE_IGNORE only logged an error and fell through to Add(), registering a dead query (ReChecker never fires the callback when query->flag does not match, and NONE/IGNORE never match) while returning a working-looking handle to the plugin. Return FALSE after the error, consistent with the other error paths (empty file, public not found).
|
@s1lentq Can you add this request to master as well as those others? It’s taking an awfully long time |
Nord1cWarr1or
deleted the
fix/rechecker-registerqueryfile-invalid-flag
branch
September 24, 2026 20:50
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.
🖤
Purpose
RegisterQueryFile()documents thattype"can be only RES_TYPE_EXISTS, RES_TYPE_MISSING or RES_TYPE_HASH_ANY", butRES_TYPE_NONE/RES_TYPE_IGNOREwere only logged, not rejected: afterAMXX_LogErrorthebreakleaves the switch and registration continues, returning a handle that only looks alive. Its forward can never fire — ReChecker invokes the query callback only whenquery->flag == typeFind, and NONE/IGNORE match no resource-check event. Resolves #393.Approach
One line. After the error log, return
FALSE— consistent with the native's other error paths (emptyfileargument, public callback not found), which already do:Open Questions and Pre-Merge TODOs
DT_TEXTRELld warning.0instead of a dead handle; valid flags (RES_TYPE_EXISTS,RES_TYPE_MISSING,RES_TYPE_HASH_ANY) take the same paths as before.resource.cpp): the callback fires only onquery->flag == typeFind.Learning
Callback invocation condition traced in ReChecker 2.7
resource.cpp.Resolves: #393