From: robertl Date: Wed, 19 Jan 2005 03:19:56 +0000 (+0000) Subject: If we don't have a name on the way in, give it a shortname. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~3820 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=336d4c03df039b56dd3dc10587bfbe47d031b64b;p=gpsbabel.git If we don't have a name on the way in, give it a shortname. --- diff --git a/gpsbabel/route.c b/gpsbabel/route.c index 0f0733087..4f3b82428 100644 --- a/gpsbabel/route.c +++ b/gpsbabel/route.c @@ -100,6 +100,11 @@ route_add_wpt(route_head *rte, waypoint *wpt) ENQUEUE_TAIL(&rte->waypoint_list, &wpt->Q); rte->rte_waypt_ct++; /* waypoints in this route */ rte_waypts++; /* total waypoints in all routes */ + if (wpt->shortname == NULL) { + char tmpnam[10]; + snprintf(tmpnam, sizeof(tmpnam), "RPT%03d",rte_waypts); + wpt->shortname = xstrdup(tmpnam); + } } void