(svn r14064) -Fix [FS#1752]: check for the length of strings (in bytes) in the command. Checking for the length in pixels is impossible because that differs per client.
This commit is contained in:
@@ -366,8 +366,7 @@ verify_name:;
|
||||
}
|
||||
|
||||
GetString(buffer, str, lastof(buffer));
|
||||
if (strlen(buffer) >= 32 || GetStringBoundingBox(buffer).width >= 150)
|
||||
goto bad_town_name;
|
||||
if (strlen(buffer) >= MAX_LENGTH_COMPANY_NAME_BYTES) goto bad_town_name;
|
||||
|
||||
set_name:;
|
||||
p->name_1 = str;
|
||||
|
Reference in New Issue
Block a user