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
+4
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) {
+1
View File
@@ -0,0 +1 @@
-c hex:empty_lines.hex
+7
View File
@@ -0,0 +1,7 @@
5721d9
a9d4fe
ffffff
Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B