summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-12-14 20:26:54 +0000
committerfrosch <frosch@openttd.org>2011-12-14 20:26:54 +0000
commitdad042585c6e70e46b0e74e06c5791ec71d93879 (patch)
treed164288e088115a7e150050d543b024d47f3b241 /src
parent0a7b49e398d6bc754d4bceb08de8f362b8a7764d (diff)
downloadopenttd-dad042585c6e70e46b0e74e06c5791ec71d93879.tar.xz
(svn r23516) -Fix [FS#4886]: ScriptSign::BuildSign() returned wrong result if the sign name was too long.
Diffstat (limited to 'src')
-rw-r--r--src/script/api/script_sign.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/script_sign.cpp b/src/script/api/script_sign.cpp
index 555ccdb4b..051fb983d 100644
--- a/src/script/api/script_sign.cpp
+++ b/src/script/api/script_sign.cpp
@@ -67,7 +67,7 @@
{
EnforcePrecondition(INVALID_SIGN, ::IsValidTile(location));
EnforcePrecondition(INVALID_SIGN, !::StrEmpty(text));
- EnforcePreconditionCustomError(false, ::Utf8StringLength(text) < MAX_LENGTH_SIGN_NAME_CHARS, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG);
+ EnforcePreconditionCustomError(INVALID_SIGN, ::Utf8StringLength(text) < MAX_LENGTH_SIGN_NAME_CHARS, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG);
if (!ScriptObject::DoCommand(location, 0, 0, CMD_PLACE_SIGN, text, &ScriptInstance::DoCommandReturnSignID)) return INVALID_SIGN;