# HG changeset patch # User rubidium # Date 1221239488 0 # Node ID 7e734c2872596e29a1a1f46f1972c6c2d0b6519d # Parent 7a66cb62eef33a89a8a33405756c29bdabf18661 (svn r14296) -Codechange: there is no case where an invalid waypoint index should be passed to be drawn as a string. diff -r 7a66cb62eef3 -r 7e734c287259 src/strings.cpp --- a/src/strings.cpp Fri Sep 12 17:05:23 2008 +0000 +++ b/src/strings.cpp Fri Sep 12 17:11:28 2008 +0000 @@ -822,9 +822,9 @@ 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];