diff options
author | rubidium <rubidium@openttd.org> | 2010-12-05 22:24:04 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-12-05 22:24:04 +0000 |
commit | 091263317e7eb8a882813a11f6da53058c266df5 (patch) | |
tree | 1d04254627126917ad0b56c2c296335dca137506 /src/depot_cmd.cpp | |
parent | 9a1805064654d5f0e348f8a7b990532bfb66921a (diff) | |
download | openttd-091263317e7eb8a882813a11f6da53058c266df5.tar.xz |
(svn r21409) -Codechange: limit depot name by amount of characters, not bytes
Diffstat (limited to 'src/depot_cmd.cpp')
-rw-r--r-- | src/depot_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/depot_cmd.cpp b/src/depot_cmd.cpp index 2c507f73f..159c5bb04 100644 --- a/src/depot_cmd.cpp +++ b/src/depot_cmd.cpp @@ -53,7 +53,7 @@ CommandCost CmdRenameDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 bool reset = StrEmpty(text); if (!reset) { - if (strlen(text) >= MAX_LENGTH_DEPOT_NAME_BYTES) return CMD_ERROR; + if (Utf8StringLength(text) >= MAX_LENGTH_DEPOT_NAME_CHARS) return CMD_ERROR; if (!IsUniqueDepotName(text)) return_cmd_error(STR_ERROR_NAME_MUST_BE_UNIQUE); } |