diff --git a/src/rds.c b/src/rds.c index 1b218dc..3cfb501 100644 --- a/src/rds.c +++ b/src/rds.c @@ -503,6 +503,11 @@ void set_rds_ps(unsigned char *ps) { void set_rds_tps(unsigned char *tps) { uint8_t len = 0; + if(tps[0] == '\0') { + memset(rds_data.tps, 0, PS_LENGTH); + return; + } + rds_state.tps_update = 1; memset(rds_data.tps, ' ', PS_LENGTH); while (*tps != 0 && len < PS_LENGTH) @@ -512,7 +517,7 @@ void set_rds_tps(unsigned char *tps) { void set_rds_lps(unsigned char *lps) { uint8_t i = 0, len = 0; - if (!lps[0]) { + if(lps[0] == '\0') { memset(rds_data.lps, 0, LPS_LENGTH); return; }