Merge pull request #314 from Th3-822/fix-strncmp-case-sensitivity

Fix strncmp case sensitivity
This commit is contained in:
Vincent Herbet 2015-12-03 00:55:20 +01:00
commit 4cea082303

View File

@ -1311,9 +1311,9 @@ static cell AMX_NATIVE_CALL n_strncmp(AMX *amx, cell *params)
char *str2 = get_amxstring(amx, params[2], 1, len); char *str2 = get_amxstring(amx, params[2], 1, len);
if (params[4]) if (params[4])
return strncmp(str1, str2, (size_t)params[3]);
else
return strncasecmp(str1, str2, (size_t)params[3]); return strncasecmp(str1, str2, (size_t)params[3]);
else
return strncmp(str1, str2, (size_t)params[3]);
} }
static cell AMX_NATIVE_CALL n_strfind(AMX *amx, cell *params) static cell AMX_NATIVE_CALL n_strfind(AMX *amx, cell *params)