attempt to fix looping

This commit is contained in:
2026-04-22 20:01:18 +02:00
parent 8c663df47e
commit d45d4ecf1a
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -6,7 +6,9 @@ uecp.rt_tx_remaining = 0
hooks.rt_transmission[#hooks.rt_transmission + 1] = function ()
if #uecp.rt_buffer == 0 then return end
if #uecp.rt_buffer > 1 and uecp.rt_tx_remaining > 1 then
if #uecp.rt_buffer == 1 then return end
if uecp.rt_tx_remaining > 1 then
uecp.rt_tx_remaining = uecp.rt_tx_remaining - 1
return
end
+1 -1
View File
@@ -6,7 +6,7 @@ void set_rds_rt(RDSEncoder* enc, const char *rt, uint8_t program) {
enc->state[program].rt_update = 1;
memset(enc->data[program].rt, ' ', RT_LENGTH);
while (*rt != 0 && len < RT_LENGTH) enc->data[program].rt[len++] = *rt++;
while (*rt != '\r' && *rt != 0 && len < RT_LENGTH) enc->data[program].rt[len++] = *rt++;
while (len > 0 && enc->data[program].rt[len - 1] == ' ') len--;