|
|
@ -303,10 +303,13 @@ void settings_load_ini_key(const char *restrict section, const char *restrict ke |
|
|
|
const char *nameptr = strchr(section, ':'); |
|
|
|
const char *nameptr = strchr(section, ':'); |
|
|
|
const char *csptr = strchr(section, '@'); |
|
|
|
const char *csptr = strchr(section, '@'); |
|
|
|
|
|
|
|
|
|
|
|
if (nameptr && csptr) { |
|
|
|
if (nameptr != NULL && csptr != NULL) { |
|
|
|
strncpy(namebuf, nameptr+1, csptr - nameptr - 1); |
|
|
|
strncpy(namebuf, nameptr+1, csptr - nameptr - 1); |
|
|
|
|
|
|
|
namebuf[csptr - nameptr - 1] = 0; |
|
|
|
uint8_t cs = (uint8_t) avr_atoi(csptr + 1); |
|
|
|
uint8_t cs = (uint8_t) avr_atoi(csptr + 1); |
|
|
|
ureg_load_unit_ini_key(namebuf, key, value, cs); |
|
|
|
|
|
|
|
|
|
|
|
bool res = ureg_load_unit_ini_key(namebuf, key, value, cs); |
|
|
|
|
|
|
|
if (!res) dbg("!! error loading %s@%d.%s = %s", namebuf, (int)cs, key, value); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
dbg("! Bad config key: [%s] %s = %s", section, key, value); |
|
|
|
dbg("! Bad config key: [%s] %s = %s", section, key, value); |
|
|
|
} |
|
|
|
} |
|
|
|