mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-27 04:43:52 +01:00
fix the error
This commit is contained in:
@@ -366,16 +366,13 @@ void process_ascii_cmd(RDSModulator* enc, unsigned char *str) {
|
|||||||
unsigned char *cmd, *arg;
|
unsigned char *cmd, *arg;
|
||||||
uint16_t cmd_len = _strnlen((const char*)str, CTL_BUFFER_SIZE);
|
uint16_t cmd_len = _strnlen((const char*)str, CTL_BUFFER_SIZE);
|
||||||
uint8_t to_save = 0, cmd_reached = 0;
|
uint8_t to_save = 0, cmd_reached = 0;
|
||||||
unsigned char *original_str = str; // Store the original string pointer
|
|
||||||
|
|
||||||
if (str[0] == '*') {
|
if (str[0] == '*') {
|
||||||
to_save = 1;
|
to_save = 1;
|
||||||
str++; // Skip the asterisk for command processing
|
str++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Special case for save commands without '=' (like *ALL)
|
|
||||||
if (to_save && !strchr((const char*)str, '=')) {
|
if (to_save && !strchr((const char*)str, '=')) {
|
||||||
// Save without further processing
|
|
||||||
char option[32] = {0};
|
char option[32] = {0};
|
||||||
snprintf(option, sizeof(option), "%s", (const char*)str);
|
snprintf(option, sizeof(option), "%s", (const char*)str);
|
||||||
saveToFile(enc->enc, option);
|
saveToFile(enc->enc, option);
|
||||||
|
|||||||
Reference in New Issue
Block a user