summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-09-12 17:11:28 +0000
committerrubidium <rubidium@openttd.org>2008-09-12 17:11:28 +0000
commite9a3ed016d682aed5b89c7f1444d6e751a85e380 (patch)
tree6bf1c841bd750a770ab0fdfeb4884b0cc54c13ba /src/strings.cpp
parent95058df2cadc7610865201d86373abb89080f553 (diff)
downloadopenttd-e9a3ed016d682aed5b89c7f1444d6e751a85e380.tar.xz
(svn r14296) -Codechange: there is no case where an invalid waypoint index should be passed to be drawn as a string.
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index f644eb795..065b617fb 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -822,9 +822,9 @@ static char* FormatString(char* buff, const char* str, const int64* argv, uint c
case SCC_WAYPOINT_NAME: { // {WAYPOINT}
Waypoint *wp = GetWaypoint(GetInt32(&argv));
- if (!wp->IsValid()) { // waypoint doesn't exist anymore
- buff = GetStringWithArgs(buff, STR_UNKNOWN_DESTINATION, NULL, last);
- } else if (wp->name != NULL) {
+ assert(wp->IsValid());
+
+ if (wp->name != NULL) {
buff = strecpy(buff, wp->name, last);
} else {
int64 temp[2];