From: mfranz Date: Mon, 8 May 2006 14:53:23 +0000 (+0000) Subject: ignore spaces after the colon in "@insert 3: ebase" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=264edc470d5bcc8328b8d2d9ee4f7bc1cad0a3ae;p=flightgear.git ignore spaces after the colon in "@insert 3: ebase" --- diff --git a/src/Autopilot/route_mgr.cxx b/src/Autopilot/route_mgr.cxx index 654976e1d..de42860f2 100644 --- a/src/Autopilot/route_mgr.cxx +++ b/src/Autopilot/route_mgr.cxx @@ -383,7 +383,11 @@ void FGRouteMgr::Listener::valueChanged(SGPropertyNode *prop) else if (!strncmp(s, "@insert", 7)) { char *r; int pos = strtol(s + 7, &r, 10); - if (*r++ == ':' && *r) + if (*r++ != ':') + return; + while (isspace(*r)) + r++; + if (*r) mgr->new_waypoint(r, pos); } else mgr->new_waypoint(s);