Merge pull request #327 from Arkshine/fix/replace_stringex

Fix typo in replace_stringex native
This commit is contained in:
Vincent Herbet 2015-12-24 23:13:04 +01:00
commit 866339eff6

View File

@ -348,12 +348,12 @@ static cell AMX_NATIVE_CALL replace_stringex(AMX *amx, cell *params)
char *ptr = UTIL_ReplaceEx(text, maxlength + 1, search, searchLen, replace, replaceLen, caseSensitive); // + EOS char *ptr = UTIL_ReplaceEx(text, maxlength + 1, search, searchLen, replace, replaceLen, caseSensitive); // + EOS
if (ptr == NULL) if (!ptr)
{ {
return -1; return -1;
} }
set_amxstring(amx, params[1], ptr, maxlength); set_amxstring(amx, params[1], text, maxlength);
return ptr - text; return ptr - text;
} }