From a31621dd0c08c7bbede41a06d0ebf8abab1b66a5 Mon Sep 17 00:00:00 2001 From: arkshine Date: Wed, 13 Feb 2013 00:54:26 -0800 Subject: [PATCH] Fix strfind ignoring its last parameter (bug 4070, r=dvander). --- amxmodx/string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amxmodx/string.cpp b/amxmodx/string.cpp index 2adc57fd..ac697e9d 100755 --- a/amxmodx/string.cpp +++ b/amxmodx/string.cpp @@ -1035,7 +1035,7 @@ static cell AMX_NATIVE_CALL n_strfind(AMX *amx, cell *params) if (params[4] > len) return -1; - char *find = strstr(str, sub); + char *find = strstr(str + params[4], sub); if (!find) return -1;