(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:
rubidium
2008-08-13 06:22:04 +00:00
parent c816cc37fd
commit 8dffbcfd26
8 changed files with 16 additions and 8 deletions

View File

@@ -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;