mirror of
https://github.com/gbdev/rgbds.git
synced 2026-05-16 14:41:44 +00:00
Ignore empty lines in HEX files
They are free-form enough that empty lines should probably be supported.
This commit is contained in:
@@ -401,6 +401,10 @@ static void parseHEXFile(std::filebuf &file) {
|
|||||||
if (!readLine(file, line)) {
|
if (!readLine(file, line)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// Ignore empty lines.
|
||||||
|
if (line.length() == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (line.length() != 6
|
if (line.length() != 6
|
||||||
|| line.find_first_not_of("0123456789ABCDEFabcdef"sv) != std::string::npos) {
|
|| line.find_first_not_of("0123456789ABCDEFabcdef"sv) != std::string::npos) {
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
-c hex:empty_lines.hex
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
5721d9
|
||||||
|
|
||||||
|
a9d4fe
|
||||||
|
|
||||||
|
|
||||||
|
ffffff
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 712 B |
Reference in New Issue
Block a user