From ab1f3d1fe9f376c1e6dac83e02e9b63211d1499b Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 16 Dec 2014 23:07:13 +0000 Subject: Currected a bug where the waypoint number would always be 1 in error messages while parsing the [patrol] section. --- src/game/base/patrol.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/base/patrol.cc b/src/game/base/patrol.cc index 78d2ebd..679b81e 100644 --- a/src/game/base/patrol.cc +++ b/src/game/base/patrol.cc @@ -81,10 +81,11 @@ void Patrol::set_faction(Faction *faction) void Patrol::validate() { - int waypoint_counter = 1; + int waypoint_counter = 0; for (WayPoints::iterator it = patrol_waypoints.begin(); it != patrol_waypoints.end(); ++it) { WayPoint *waypoint = (*it); + ++waypoint_counter; if (waypoint->target_label().size() == 0) { con_warn << " Patrol '" << label() << "' WayPoint " << waypoint_counter << " has no target" << "'\n"; -- cgit v1.2.3