mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-11 23:42:24 +00:00
Merge pull request #484 from daerath/master
* CheckNameFilter minimum surname check incorrect
This commit is contained in:
commit
50a8a3017b
@ -1183,21 +1183,16 @@ bool Database::CheckNameFilter(const char* name, bool surname)
|
|||||||
{
|
{
|
||||||
std::string str_name = name;
|
std::string str_name = name;
|
||||||
|
|
||||||
if(surname)
|
// the minimum 4 is enforced by the client too
|
||||||
|
if (!name || strlen(name) < 4)
|
||||||
{
|
{
|
||||||
// the minimum 4 is enforced by the client too
|
return false;
|
||||||
if(!name || strlen(name) < 3)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
// Given name length is enforced by the client too
|
||||||
|
if (!surname && strlen(name) > 15)
|
||||||
{
|
{
|
||||||
// the minimum 4 is enforced by the client too
|
return false;
|
||||||
if(!name || strlen(name) < 4 || strlen(name) > 15)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < str_name.size(); i++)
|
for (size_t i = 0; i < str_name.size(); i++)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user