diff options
author | Stijn Buys <ingar@osirion.org> | 2014-12-16 23:07:13 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2014-12-16 23:07:13 +0000 |
commit | ab1f3d1fe9f376c1e6dac83e02e9b63211d1499b (patch) | |
tree | 4657b1bc909a1d756807a76fe7f456f7cff4ca13 /src/game/base | |
parent | 029028b2e80d43497f4dd19c5aff17903b0a504f (diff) |
Currected a bug where the waypoint number would always be 1 in error messages while parsing the [patrol] section.
Diffstat (limited to 'src/game/base')
-rw-r--r-- | src/game/base/patrol.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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"; |