diff --git a/d868uv.c b/d868uv.c index 9c4e89c..04bd65a 100644 --- a/d868uv.c +++ b/d868uv.c @@ -2817,6 +2817,13 @@ static void d868uv_write_csv(radio_device_t *radio, FILE *csv) return; } while (csv_read(csv, &radioid, &callsign, &name, &city, &state, &country, &remarks)) { + radioid = trim_spaces(radioid, 16); + callsign = trim_spaces(callsign, 16); + name = trim_spaces(name, 16); + city = trim_spaces(city, 15); + state = trim_spaces(state, 16); + country = trim_spaces(country, 16); + remarks = trim_spaces(remarks, 16); //printf("%s,%s,%s,%s,%s,%s,%s\n", radioid, callsign, name, city, state, country, remarks); unsigned id = strtoul(radioid, 0, 10); diff --git a/util.c b/util.c index dcfc514..2a4af0b 100644 --- a/util.c +++ b/util.c @@ -820,13 +820,13 @@ again: if ((p = strchr(*remarks, ',')) != 0) *p = 0; - *radioid = trim_spaces(trim_quotes(*radioid), 16); - *callsign = trim_spaces(trim_quotes(*callsign), 16); - *name = trim_spaces(trim_quotes(*name), 16); - *city = trim_spaces(trim_quotes(*city), 15); - *state = trim_spaces(trim_quotes(*state), 16); - *country = trim_spaces(trim_quotes(*country), 16); - *remarks = trim_spaces(trim_quotes(*remarks), 16); + *radioid = trim_spaces(trim_quotes(*radioid), 100); + *callsign = trim_spaces(trim_quotes(*callsign), 100); + *name = trim_spaces(trim_quotes(*name), 100); + *city = trim_spaces(trim_quotes(*city), 100); + *state = trim_spaces(trim_quotes(*state), 100); + *country = trim_spaces(trim_quotes(*country), 100); + *remarks = trim_spaces(trim_quotes(*remarks), 100); //printf("%s,%s,%s,%s,%s,%s,%s\n", *radioid, *callsign, *name, *city, *state, *country, *remarks); if (**radioid < '1' || **radioid > '9')