Skip to content

Commit

Permalink
🥅 not use restart-ignore_bytes in v0 files
Browse files Browse the repository at this point in the history
  • Loading branch information
ToruNiina committed Sep 1, 2021
1 parent ff545c8 commit 4574c02
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libasd/read_header.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ read_header_impl(Header<version<0>>& header, sourceT& source)
header.comment[i] = read_binary_as<std::int8_t>(source);
}

// force read even if file header or spec is broken
restart_from(source, starting_point);
ignore_bytes(source, static_cast<std::size_t>(header.file_header_size));
// sometimes version 0 file contains incorrect file_header_size, so here
// we don't rely on the `file_header_size`

// // force read even if file header or spec is broken
// restart_from(source, starting_point);
// ignore_bytes(source, static_cast<std::size_t>(header.file_header_size));

return source;
}
Expand Down

0 comments on commit 4574c02

Please sign in to comment.