0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-26 20:33:53 +01:00

trim spaces on shortrt

This commit is contained in:
2025-03-22 18:28:22 +01:00
parent 00cc8fe7b8
commit 40898eaca3

View File

@@ -823,7 +823,7 @@ void set_rds_rt1(RDSEncoder* enc, char *rt1) {
memset(enc->data[enc->program].rt1, ' ', RT_LENGTH);
while (*rt1 != 0 && len < RT_LENGTH) enc->data[enc->program].rt1[len++] = *rt1++;
while (len > 0 && enc->data[enc->program].rt1[len - 1] == ' ') {
while (len > 0 && enc->data[enc->program].rt1[len - 1] == ' ' && enc->data[enc->program].shortrt) {
len--;
}
@@ -849,7 +849,7 @@ void set_rds_rt2(RDSEncoder* enc, char *rt2) {
memset(enc->data[enc->program].rt2, ' ', RT_LENGTH);
while (*rt2 != 0 && len < RT_LENGTH) enc->data[enc->program].rt2[len++] = *rt2++;
while (len > 0 && enc->data[enc->program].rt2[len - 1] == ' ') {
while (len > 0 && enc->data[enc->program].rt2[len - 1] == ' ' && enc->data[enc->program].shortrt) {
len--;
}