diff options
author | rubidium <rubidium@openttd.org> | 2008-08-13 06:22:04 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-08-13 06:22:04 +0000 |
commit | 2d94337e1ac754f6181d537708fe3a187d2c7400 (patch) | |
tree | 4d5843494903387aa4370746ec69c55363be9a66 /src/players.cpp | |
parent | 97c184f8f8265cf59b24ab3081a032c7162afcb5 (diff) | |
download | openttd-2d94337e1ac754f6181d537708fe3a187d2c7400.tar.xz |
(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.
Diffstat (limited to 'src/players.cpp')
-rw-r--r-- | src/players.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/players.cpp b/src/players.cpp index d8e8ad685..e42d8d329 100644 --- a/src/players.cpp +++ b/src/players.cpp @@ -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; |