diff --git a/firmware/application/freqman.cpp b/firmware/application/freqman.cpp index c4c0db1db..5f826f3c0 100644 --- a/firmware/application/freqman.cpp +++ b/firmware/application/freqman.cpp @@ -146,6 +146,10 @@ bool load_freqman_file_ex(std::string& file_stem, freqman_db& db, bool load_freq // Reset line_start to beginning of buffer line_start = file_data; + // If EOF reached, insert 0x0A after, in case the last line doesn't have a C/R + if (read_size.value() < 256) + *(line_start + read_size.value()) = 0x0A; + // Look for complete lines in buffer while ((line_end = strstr(line_start, "\x0A"))) {