Bug fix in a sanity check in PrefixTree.h

This commit is contained in:
Ulrich Germann 2014-11-21 23:58:17 +00:00
parent ef1262a17f
commit 6a70eed481

View File

@ -173,8 +173,7 @@ public:
ptr.resize(keys.size());
std::vector<OFF_T> rawOffs(keys.size());
size_t bytes_read = fread(&rawOffs[0], sizeof(OFF_T), keys.size(), f);
UTIL_THROW_IF2(bytes_read != sizeof(OFF_T) * keys.size(),
"Read error at " << HERE);
UTIL_THROW_IF2(bytes_read != keys.size(), "Read error at " << HERE);
for(size_t i=0; i<ptr.size(); ++i)
if (rawOffs[i]) ptr[i].set(f, rawOffs[i]);
}