Skip to content

Commit

Permalink
Ignore vector of known values when it's empty
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelTupynamba committed Jun 17, 2022
1 parent 2e24bf9 commit e53b055
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion file_accessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,8 @@ class file_accessor {

template<typename T>
long long file_integer(unsigned size, unsigned bits, std::vector<T>& known) {
assert(known.size());
if(!known.size())
return file_integer(size, bits);
assert_cond(0 < size && size <= 8, "sizeof integer invalid");
assert_cond(file_pos + size <= MAX_FILE_SIZE, "file size exceeded MAX_FILE_SIZE");
std::vector<T> compatible;
Expand Down

0 comments on commit e53b055

Please sign in to comment.