Skip to content

Commit a249b2d

Browse files
committed
Strip trailing space padding from ADS-B callsign
1 parent 8f81b4b commit a249b2d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Source/Aviation/ADSB.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ namespace Plane
9393
}
9494
}
9595
callsign[n] = 0;
96+
97+
while (n > 0 && callsign[n - 1] == ' ')
98+
callsign[--n] = 0;
9699
}
97100

98101
// Decode 13 bit AC altitude field (in DF 20 and others)

0 commit comments

Comments
 (0)