Ignore empty lines in HEX files

They are free-form enough that empty lines should probably be supported.
This commit is contained in:
ISSOtm
2024-07-26 14:59:18 +02:00
committed by Sylvie
parent a23b4732e3
commit d8aceaea4a
4 changed files with 12 additions and 0 deletions

View File

@@ -401,6 +401,10 @@ static void parseHEXFile(std::filebuf &file) {
if (!readLine(file, line)) {
break;
}
// Ignore empty lines.
if (line.length() == 0) {
continue;
}
if (line.length() != 6
|| line.find_first_not_of("0123456789ABCDEFabcdef"sv) != std::string::npos) {