Skip to content
Snippets Groups Projects
Commit f7137422 authored by Salson Mikael's avatar Salson Mikael
Browse files

bug: byte EOF may exist in the file

parent ad4001b3
No related branches found
No related tags found
No related merge requests found
......@@ -165,7 +165,10 @@ bit_vector create_bitvector_from_file(const std::string filename) {
bit_vector bv(length, 0);
char c;
size_t pos = 0;
while ((c = input.get()) != EOF) {
while (! input.eof()) {
c = input.get();
if (input.eof())
break;
int mask = 1<<7;
while (mask > 0) {
if (c & mask)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment