From 6ddeef103399c2761b733b12d2112fceb4de7f9a Mon Sep 17 00:00:00 2001 From: Nord1cWarr1or Date: Sun, 13 Sep 2026 23:52:44 +0400 Subject: [PATCH] fix: reject invalid ResourceType flag in RegisterQueryFile 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). --- reapi/src/natives/natives_rechecker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reapi/src/natives/natives_rechecker.cpp b/reapi/src/natives/natives_rechecker.cpp index 4fc20575..a0c13451 100644 --- a/reapi/src/natives/natives_rechecker.cpp +++ b/reapi/src/natives/natives_rechecker.cpp @@ -22,7 +22,7 @@ cell AMX_NATIVE_CALL RegisterQueryFile(AMX *amx, cell *params) case RES_TYPE_NONE: case RES_TYPE_IGNORE: AMXX_LogError(amx, AMX_ERR_NATIVE, "%s: invalid flag type \"%i\".", __FUNCTION__, flag); - break; + return FALSE; case RES_TYPE_EXISTS: if (params[arg_hash] == -1) { flag = RES_TYPE_HASH_ANY;