From b30a46e3bc0039e478f7459d54c47efc7e471369 Mon Sep 17 00:00:00 2001 From: Oliver Jakoubek Date: Fri, 29 May 2020 14:22:45 +0200 Subject: [PATCH] Set default ramp number to -1 to allow the use of 0 as a real ramp number --- route_list.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/route_list.go b/route_list.go index 4bc364a..5f4bcef 100644 --- a/route_list.go +++ b/route_list.go @@ -22,7 +22,7 @@ func (r *RouteListEntry) SetCopiesInRoute(copiesInRoute int) { } func (r *RouteListEntry) RampNumber() string { - if r.rampNumber == 0 { + if r.rampNumber == -1 { return "" } return fmt.Sprintf("+25%02d", r.rampNumber) @@ -57,6 +57,7 @@ func NewRouteListEntry() *RouteListEntry { messageStart: "2401", messageEnd: "!", }, + rampNumber: -1, } return &rl }